|
What you want to do can be easily done using a Uniform array. See the
Uniform header. For the shader side of things, see the orange book, or
attend my upcoming OpenGL 3 course: www.techsoupcorp.com. Paul Martz Nico Kruithof wrote: Hello, I'm trying to extend the draw instanced example in such a way that I can position the quads outside of the shader. So I would like to be able to use an array of positions inside the vertex shader that I would index with gl_InstanceID and use that to offset the current instance. The array of positions would then be updated from the render thread every frame in a callback.Could someone tell me how to set this up in the shader and how to access the array in the callback function? Thanks, Nico _______________________________________________ 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

