Hi Robert,

I would like to re-raise the issue of uniform array naming, now that it is
affecting me personally :)
To recap:

I have a uniform array in a shader defined as:

   uniform bool positions[1];

osg::Program calls glGetActiveUniform() to build a mapping of compiled
uniforms by name. On some systems, the name returned is "positions" and on
others it is "positions[0]". When the latter happens, a corresponding
osg::Uniform named "positions" will fail since it cannot find a matching
uniform location in the mapping (since it's filed under "positions[0]").

I am not convinced that this is a driver bug. It seems more like an
ambiguity. The docs say that the 'uniform location for "positions" and
"positions[0]" are the same; they point to the first element of the array.'
 (http://bit.ly/hnqbUi). I don't see anything that says the value returned
from glGetActiveUniform() must be one or the other.

If both names are valid and equivalent, shouldn't we account for both
possibilities in osg::Program? I suppose you could just alter
getUniformLocation(...) to check for both variations.

Here are the past threads on the topic. The issue crops up on both ATI and
NVIDIA systems.

   http://markmail.org/thread/5mans4howfbu2qtg
   http://forum.openscenegraph.org/viewtopic.php?t=1828

System: WinXP 32, ATI HD5550/10.11, OSG SVN.

Thanks.


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

Reply via email to