On Thu, 2011-09-15 at 12:00 +0100, Robert Osfield wrote: > Hi All, > > I'm note yet clear on exactly where the problems are stemming form > with the NVidia 275+ drivers but with the assumption that the > glGetActiveUniform is appending a [..] and the the matching > glGetUniformLocation can handle the name without the [..] appended > I've written some code to do the trimming off of the [..]. I've > tested this with an artificially append [0] and it works fine, but > haven't yet tested against the problem drivers. My code looks like: > > _extensions->glGetActiveUniform( _glProgramHandle, > i, maxLen, 0, &size, &type, name ); > > int pos = strlen(name); > if (pos>0 && name[pos-1]==']') > { > // need to trim [..] from end of name as some drivers > append this causing problems with look up. > --pos; > while(pos>0 && name[pos]!='[') { --pos; } > name[pos] = 0; > } > > GLint loc = _extensions->glGetUniformLocation( > _glProgramHandle, name ); > > I have also attached the modified Program.cpp. Could users that have > seen the driver issue test out this proposed version of Program.cpp? > If things work fine I'll check it into svn/trunk.
This continues to resolve the problem for me on 280+, so I must assume it also works on 275 (the issue existed on both). > Cheers, > Robert. > _______________________________________________ > 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