2.8 branch: Uniform lookup by cached name ID. Trunk revisions r11952, r11998, and r12074.
This commit is contained in:
@@ -394,7 +394,7 @@ bool Program::getGlProgramInfoLog(unsigned int contextID, std::string& log) cons
|
||||
return getPCP( contextID )->getInfoLog( log );
|
||||
}
|
||||
|
||||
const Program::ActiveVarInfoMap& Program::getActiveUniforms(unsigned int contextID) const
|
||||
const Program::ActiveUniformMap& Program::getActiveUniforms(unsigned int contextID) const
|
||||
{
|
||||
return getPCP( contextID )->getActiveUniforms();
|
||||
}
|
||||
@@ -532,10 +532,9 @@ void Program::PerContextProgram::linkProgram()
|
||||
|
||||
if( loc != -1 )
|
||||
{
|
||||
_uniformInfoMap[name] = ActiveVarInfo(loc,type,size);
|
||||
_uniformInfoMap[Uniform::getNameID(reinterpret_cast<const char*>(name))] = ActiveVarInfo(loc,type,size);
|
||||
|
||||
osg::notify(osg::INFO)
|
||||
<< "\tUniform \"" << name << "\""
|
||||
OSG_INFO << "\tUniform \"" << name << "\""
|
||||
<< " loc="<< loc
|
||||
<< " size="<< size
|
||||
<< " type=" << Uniform::getTypename((Uniform::Type)type)
|
||||
|
||||
Reference in New Issue
Block a user