Hi Paul,

On Mon, Aug 10, 2009 at 3:12 AM, Paul Martz<[email protected]> wrote:
> Is there no way for an app to associate vertex attrib data with a variable
> name string (like Uniforms)? If not, why not? And would you be open to a
> code submission that adds this functionality?

Yes, there is no currently way of associating vertex attrib data with
a variable name string.  This was a deliberate decision based on the
fact that you can't do a query of the name binding within a display
list and still get the correct binding, as the GLSL program can change
independent of the geometries display lists.  The bottom line is
variable name strings for vertex attributes are incompatible with
display lists, which hardwired indices work fine either way.

Fast forward to GL3 and display lists are no longer on the menu, and
one has to use name strings when assigned vertex attributes so both
have one barrier removed and the option to not use name strings
removed from the menu, so we have bite the bullet and go implement
them.  To this we'll probably need to add a string name into the
Geometry::ArrayData structure, and interface into osg::Geometry for
setting it, and internal implementation details for setting up the
binding during Geometry::drawImplementation(..)

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

Reply via email to