On 03/07/2012 04:42 PM, Renato Oliveira wrote:
Hi,

sure i understand, sorry about that. i just wanted to know if someone already 
experienced the same issue before. what i am actually doing is i created a obj 
loader similar to the obj loader plugin from openscenegraph (the mojoraity of 
the code of copied directly just for test). once i have loaded the file, i 
create a mesh using all the information loaded and set the vertices, normals, 
texture cordinates, and primitive set. no problem there. than i attache my mesh 
to the a viewer like anyother example of the osg and run. like i said before, 
the crash happens when the cullvisitor's traverse function gets called when its 
building the sceneview.

If the CullVisitor is crashing in the traverse() method, it's very likely that you've given the Viewer an invalid mesh to render. That method is used every frame by every OSG program in existence. It's extremely unlikely that it's the cause of your problem.

You'll need to dig into your reworked .obj loader and figure out where the problem is. Make sure the vertices, normals, and texture coordinates all have the right number of items. Make sure that the primitives you create make sense (e.g. don't create a triangle with two or four vertices). Check for NaN's along the way. Things like that.

I'd suggest starting with an .obj file that creates a single triangle. Test that, and work up from there.

--"J"

_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to