It seems that array uniforms in shaders on OS X are reported with different names than the ones in Linux and Windows, at least with the Nvidia drivers.

For example.

The uniform

uniform vec4 boneTransforms[72];

would be reported to be named "boneTransforms" on linux and windows, but as "boneTransforms[0]" on Mac OS X. Using straight OpenGL, I can still set "boneTransforms" and it will work.

In OSG, I can't set "boneTransforms" because OSG queries the names of the uniforms and gets "boneTransforms[0]" so it thinks that "boneTransforms" is not a valid uniform. This means that I have to ifdef the name to be cross-platform, but it seems that I should still be able to set "boneTransforms" in OS X since the Open GL api allows it to work. Would it be reasonable to change OSG to strip off the "[0]" at the end of names or to check both in OSG?


--
David Guthrie
Research Software Engineer
Alion Science and Technology
BMH Operation
5365 Robin Hood Road
Norfolk, VA 23513
Tel: 757-857-5670 x 269
[EMAIL PROTECTED]



_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to