Hi Rui, I have just reviewed your VertexAttribDivisor submissions and don't believe it's the best way to tackle the problem - in particular the state for the calls to glVertexAttribDivisor will bleed into other osg::Geometry that don't explicitly set it.
I haven't yet thought deeply about the topic but my first thought would be that the osg::State::setVertexAttribPointer(..) method should probably take on responsibility for setting the value. There is also a mixing of the type of the divisor between GLint and GLuint depending upon where you are used the value. I think one should probably just use GLuint as per the OpenGL implementation of glVertexAttribDivisor and use 0 as the default as per the OpenGL defaults as well. Thoughts? Robert. On 10 August 2014 02:27, Wang Rui <[email protected]> wrote: > Hi Robert, > > I've just updated the Array/Geometry classes to support > glVertexAttribDivisor(), in which the only change to user interface is a > new GLint argument to Geometry::setVertexAttribArray(), which is -1 by > default (indicating it is disabled). I also update the osgdrawinstanced > example to show how it works with instanced geometry. > > Cheers, > > Wang Rui > > > _______________________________________________ > osg-submissions mailing list > [email protected] > > http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org > >
_______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
