Hi, Pau

GL_ARB_draw_instanced extension. Osg support instanced drawing, 
osg:PrimitiveSet allows to set number of instances for drawing. You'll need to 
write shader which will transform vertices according to gl_InstanceID (most 
basic way is to use uniform array with transform matrices for each instance, 
and index it with gl_InstanceID).

29.05.2012, 14:40, "Pau Estalella" <[email protected]>:
> Hi,
>
> Can anyone point me to some example or provide some advice on how to 
> structure a
> scene with a low poly object replicated thousands of times, at different
> orientations and positions? Each instance can be in one of the several states
> that the object can be, using an osg::Switch. The state of each instance 
> changes
> independently of the others.
> I think osg::PositionAttitudeTransform for each instance is not an option, as 
> it
> kills culling performance. Replicating the geometry and transforming the
> vertices seems a little bit wrong, and a total memory waste.
> Any ideas?
>
> Thank you very much.
>
> Cheers,
> Pau
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=47912#47912
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to