From Mike Weiblen, support GLSL uniform arrays. A couple of tweaks and fixes from Robert Osfield.

This commit is contained in:
Robert Osfield
2006-05-15 15:46:08 +00:00
parent d42a8fd269
commit bf065ed3a4
7 changed files with 618 additions and 544 deletions

View File

@@ -924,7 +924,7 @@ Uniform* StateSet::getUniform(const std::string& name)
else return 0;
}
Uniform* StateSet::getOrCreateUniform(const std::string& name, Uniform::Type type)
Uniform* StateSet::getOrCreateUniform(const std::string& name, Uniform::Type type, int numElements)
{
// for look for an appropriate uniform.
UniformList::iterator itr = _uniformList.find(name);
@@ -936,7 +936,7 @@ Uniform* StateSet::getOrCreateUniform(const std::string& name, Uniform::Type typ
// no uniform found matching name so create it..
Uniform* uniform = new Uniform(type,name);
Uniform* uniform = new Uniform(type,name,numElements);
addUniform(uniform);
return uniform;