2006/10/15, Jose Luis Hidalgo <[EMAIL PROTECTED]>:
The GraphicsWindow.cpp isn't compiled in the core of osg and havn't a good wrapper generation.
So add this line at the end of the genwrapper.conf
ignore file "osgGA/GraphicsWindow"
I send a patch for osgIntrospection to Robert to fix this and some other thing.
For this problem, I don't understand wath you call a "memory corruption", it is a bad pointer or a memory leak or ...
Hi all!
Some problems with osgIntrospection (again) :
- first, I can't compile osgWrappers from the CVS:
g++ -O -W -Wall -fPIC -pipe -I../../../../include -c ../GraphicsWindow.cpp
../../../../include/osgGA/GraphicsWindow:31: error: expected
class-name before '{' token
../GraphicsWindow.cpp: In constructor '<unnamed>::reflector25::reflector25()':
../GraphicsWindow.cpp:27: error: 'GUIActionAdapter' is not a member of 'osgGA'
../GraphicsWindow.cpp:27: error: 'GUIActionAdapter' is not a member of 'osgGA'
../GraphicsWindow.cpp:27: error: 'GUIActionAdapter' is not a member of 'osgGA'
../GraphicsWindow.cpp:27: error: 'GUIActionAdapter' is not a member of 'osgGA'
../GraphicsWindow.cpp:27: error: 'GUIActionAdapter' is not a member of 'osgGA'
../GraphicsWindow.cpp:27: error: template argument 1 is invalid
../GraphicsWindow.cpp:27: error: template argument 1 is invalid
../GraphicsWindow.cpp:27: error: template argument 3 is invalid
../GraphicsWindow.cpp:27: error: invalid type in declaration before ';' token
../GraphicsWindow.cpp:27: warning: unused variable 'btc'
am I the only one ?
The GraphicsWindow.cpp isn't compiled in the core of osg and havn't a good wrapper generation.
So add this line at the end of the genwrapper.conf
ignore file "osgGA/GraphicsWindow"
I send a patch for osgIntrospection to Robert to fix this and some other thing.
- second, this is really funny, with the 1.2 release of
osgIntrospection I have some memory corruption problems when I use
this code:
static const osgIntrospection::Type &t_referenced =
osgIntrospection::Reflection::getType("osg::Referenced");
const osgIntrospection::Type &type = v.getType();
if (type.isNonConstPointer() &&
type.getPointedType().isSubclassOf(t_referenced))
{
/* COMMENTED.... this should work but the code above corrupts the memory
_referenced =
osgIntrospection::variant_cast<osg::Referenced*>(_value);
// increase the number of references
if (_referenced)
{
_referenced->ref();
}
std::cout << "Referenced = " << _referenced << std::endl;
--------------------------------------------------------------------------------------------
*/
}
For this problem, I don't understand wath you call a "memory corruption", it is a bad pointer or a memory leak or ...
I'm trying to handle reference objects using osgIntrospection... I'm
not sure if this is the best way to do it.
Cheers,
personally I implement a new class:
class ReflectedRefPointer
{
osgIntrospection::Value _val; have a osg::Referenced Pointer
osg::ref_ptr<osg::Referenced> _ptr; handle the osg::Referenced Pointer
};
but I think to another solution :
class RefValue: public osgIntrospection::Value
{
osg::ref_ptr<osg::Referenced> _ptr; handle the osg::Referenced Pointer
};
This two solution have the avantage to let the osg::ref_ptr manage the reference and other ref_ptr mechanisme.
cheer
David Callu
_______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
