Hi David, Good detective work on tracking down what was going wrong on the Intel system. Kinda crappy that one has to workaround the excessive numerical values the driver is using as it will slow performance down on all systems. As the OpenGL specs don't rule out these large numbers I can't see a way around not using a std::map without complicating the code substantially.
Rather than merge your changes as is I've taken the extra step of removing the //commented out old code to retain the readability of the code. All these changes are now checked into svn/trunk. Cheers, Robert. On 1 March 2012 10:06, David Callu <[email protected]> wrote: > Hi Robert, > > When I run my application under Windows 7, Intel HD 3000 > I found a bug in osg::Program. > > in osg::Program::PerContextProgram : > > typedef std::vector<UniformModifiedCountPair> LastAppliedUniformList; > should be > typedef std::map<unsigned int, UniformModifiedCountPair> > LastAppliedUniformList; > > Intel driver can use index uniform value > 200000. > With a std::vector, this index uniform value generate an out of memory error > > Nothing in OpenGL or GLSL specification define index uniform value rules. > And all other implementation that deal with uniform index in osg::Program > use a std::map. > This fix could have a little performance impact but this is the cost > to pay to work with > all driver. > > I know you don't want a fix for a specific Driver/OS and i am agree > with that, but this one is only to > respect the lack of precision in specification ... > > File joint (based on commit tag osg 3.1.0) fix the bug > > Cheers > David Callu > > _______________________________________________ > osg-submissions mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org > _______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
