Dear All,

Sorry for disturbing you more. 
I am a newcomer in graphics programming. 

May I ask one clarification....

There are 14 primitives(Cuboid, Torus, Cylinder
etc...) 
supported in my application. 

For this I use derived class of osg::Geode for each
primitives.

There is a UpdateGeometry() function in each class.

This function is called each time when any change in
shape.

Please see some code in this function....

            The tesselation code will change according
to the changes needed
            and kept the vertices and normals as
member variable of this class

            // Remove all the drawables in the geode
            while(getNumDrawables())
                removeDrawable(0, 1);

            osg::Geometry* meshGeometry = new osg::Geometry;


            ...

            ....

            // Add the geometry to the geode
           addDrawable(meshGeometry);           

Now adding vertex array, normal array, 
primitiveset, color array, color indices and stateset
after 
dynamically creating the respective classes.

How to deallocate the above objects ?.
I think delete operator not working with these
objects.

Is this is a correct way ?

I think this will result in memory leaks.

Thanks in advance,

Manoj



        


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to