Hi Aurelien,

On 1 June 2013 14:46, Aurelien Albert <[email protected]> wrote:
> This submission is made against trunk version and add the loading of 
> "glVertexAttribDivisor" extension.

Thanks now merged and submitted to svn/trunk.

> For the moment, there is only the extension loaded, no associated state 
> attribute because I'm not sure what is the best way to use it in a "standard" 
> osg graph.
>
> I currently use it in specific drawables (with drawImplementation 
> re-implemented) to use draw instanced with attribute divisor, which is the 
> most efficient way to pass per-instance data to the GPU.

I just had a look at an tutorial for glVertexAttribDivisor and it
looks to be used alongside the glVertexAttribPointer, which suggests
to me that the divisor would naturally fall into the
Geometry::ArrayData or into osg::Array.  My first instinct would be
for it to go into ArrayData as it's not directly affect the attribute
pointer calls.  For lazy state updating pushing it into osg::Array and
letting osg::State work out whether it needs calling or not seems like
a neat way of hiding the complexity.

Thoughts?
Robert.
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to