Hi,

I have a scientific visualization application in which I essentially want to 
render many (hundreds of thousands) of cubes at once, of varying color and 
size. Furthermore, these cubes will change position and color every few 
seconds, and I need to position them deliberately.

Right now I am simply drawing osg::Box objects where I want them, and flushing 
the root group / reallocating from scratch on each iteration. This is a dumb 
approach and I'm looking for something more efficient.

I am not intimately familiar with openGL but it seems that instanced drawing 
might be a good fit for this problem. I've looked at the osgdrawinstanced 
example but I'm confused about how I can define the shader such that I can 
specify the transformation on a per-instance basis. 

Does anyone have a suggestion on how I could go about this, or other 
suggestions for an optimal solution?

Chris

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=49060#49060





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

Reply via email to