[osg-users] OSG Advice on Model Viewer Program

Oran Wallace oowallace at gmail.com
Fri May 29 20:13:44 PDT 2015

Hi all,

First off I want to say I'm new to OSG but I have worked with openGL.

I'm writing an application that uses OSG + Qt and I'm currently designing the geometry class. I read in a file which contains information on the geometry. The geometry is simple; points form faces, faces form rooms and rooms form the whole model. 

I want the user to be able to select arbitrary objects (probably just faces to start with), when selected the object will be highlighted. They will be able to change the color, but not edit the geometry. Additionally I will need to add/remove objects to the graph from user input, such a spheres, point and lines. Faces can have >=3 points. 

I want it do perform well for large models (500k+ points) and try to take advantage of VBOs.

Now for my questions:

Is this even possible with a single (or multiple perhaps one for triangles, quads, etc.) VBO given my criteria? Should I just use a osg::Geometry object for each face or each room (this would be the easiest I think)? 

I'm currently attempting to form triangles for everything and use a single primitiveSet and vertex pool. Is this advisable? Seems I can use a utility like the DelaunayConstraint or Tesselator to break down each face into triangles. Should I create a mapping between the new triangles and faces to make use of LineSegmentIntersector (which seems to be the only way for picking, unless I'm missing something). 

If anyone has advice or experience in something similar I would be very grateful. 

Thank you!


Read this topic online here:

More information about the osg-users mailing list