I declared the attribute exactly as you wrote. I figured out that it was crashing because I still had a left-over geom->setSecondaryColorArray(new osg::Vec4Array); I didn't populate the array, so the crash occurred. It would be nice if the osg code checked for an empty array before trying to use it. This is a little off topic, but does anyone know if there is a performance advantage over using gl_SecondaryColor versus creating your own attribute? -Mike
________________________________ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jason Daly Sent: Monday, December 10, 2007 4:11 PM To: OpenSceneGraph Users Subject: Re: [osg-users] Vertex Shader Attributes Schmidt, Michael M wrote: Hi, I was trying to use gl_SecondaryColor to pass in a vertex position offset. However, I noticed strange behavior. Does anyone know if gl_SecondaryColor gets clamped to some value? Based on your code, why not declare: attribute vec4 centerPoint; in your shader and use it that way? --"J"
_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org