Sergey Polischuk wrote:
I'm currently trying to render lots of instanced geometry and i need to setup some data for each instance (at least one 4x4 matrix :) Is there support for using uniform buffer objects in OSG? Or may be there are some another way to set per instance data in OSG to get it in shader without using plain opengl code?
UBOs are presently not supported, but it's something I'm considering adding support for sometime over the next year.
Uniform arrays would be another option, but there are upper bounds (varies by hardware) on the max array size. If you're drawing a few instances, you're probably OK using uniform arrays, but for several thousands of instances you should probably organize your data as a texture object and index into it from the vertex shader using texture coordinates derived from the instance ID.
-Paul _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

