Hi Robert -- Having coded directly to OpenGL 3 for the past year, I'm now taking a look at doing equivalent coding in OSG. I am now using the Geometry class's vertex attributes for the first time.

It seems the only way to specify vertex attribute data is by specifying the vertex attribute location (as one might obtain with a call to glGetVertexAttribLocation), rather than by the vertex attrib variable string (like what is done with Uniform StateAttributes). I'm not really sure how an app is supposed to know what vertex attrib index value to specify. (Currently I'm turning notify up to INFO and getting the vertex attrib index from the Program link output, then hardcoding it into the app.) If there's a better way to do this, please let me know. I see that the osgFX bumpmap code is also hardcoding constant values for vertex attrib data, and this is the only other vertex attrib code I could find in the source tree.

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?

Thanks.
--

Paul Martz
Skew Matrix Software LLC
http://www.skew-matrix.com
+1 303 859 9466

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

Reply via email to