I had the same experience; this was an ATI vs. NVIDIA difference. One liked the [0] and the other did not (can't remember which). The OpenGL spec says that either is acceptable. Ended up writing an ArrayUniform helper class to deal with it.
http://github.com/gwaldron/osgearth/blob/master/src/osgEarth/ShaderUtils<https://github.com/gwaldron/osgearth/blob/master/src/osgEarth/ShaderUtils> Glenn Waldron / @glennwaldron On Mon, May 14, 2012 at 10:02 AM, Eldar Insafutdinov < e.insafutdi...@gmail.com> wrote: > > lyceel wrote: > > > > The problem actually only occurs with recent NVIDIA drivers (older > > versions didn't have this issue). > > > > As David mentioned, the latest SVN and the most recent developer > > releases also include this workaround, so you won't need to add the > > "[0]" yourself if you use one of those. Obviously, it'll be in the next > > public OSG release, too. > > > > > Yes, in fact I just tried porting my code from Linux to Windows and found > that adding [0] actually breaks things, and removing it fixes it. I will > try using more recent version of OSG(I am indeed on the stable OSG 3.0.1) > and see how it works. > > Cheers > > Eldar > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=47691#47691 > > > > > > _______________________________________________ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >
_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org