Hi Paul,

Thanks. I already skimmed through the orange book but couldn't find
uniform arrays, only floats or structs. I guess arrays work similarly.
I'm interested in your course, but it's quite a trip from Europe. My
background is in computational geometry, so my mathematical background
is quite strong. I'm trying to get more practical experience using
OSG. The supportive community was one of the main reasons for chosing
this scene graph.

Bests,
Nico

On Thu, Jul 9, 2009 at 6:49 PM, Paul Martz<pma...@skew-matrix.com> wrote:
> 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
> Skew Matrix Software LLC
> http://www.skew-matrix.com
> +1 303 859 9466
>
> 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
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to