Commit 20c975c0 authored by Eric Bruneton's avatar Eric Bruneton
Browse files

added a getUniforms method in Program

git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/ork/trunk@24 28599a00-4e59-401b-b2d8-d34d4661a6c9
parent 77ad9c6d
......@@ -699,6 +699,17 @@ ptr<Module> Program::getModule(int index) const
return modules[index];
}
vector< ptr<Uniform> > Program::getUniforms() const
{
vector< ptr<Uniform> > result;
map<string, ptr<Uniform> >::const_iterator i = uniforms.begin();
while (i != uniforms.end()) {
result.push_back(i->second);
i++;
}
return result;
}
ptr<Uniform> Program::getUniform(const string &name)
{
map<string, ptr<Uniform> >::iterator i = uniforms.find(name);
......
......@@ -104,6 +104,11 @@ public:
*/
ptr<Module> getModule(int index) const;
/**
* Returns the uniforms of this program.
*/
vector< ptr<Uniform> > getUniforms() const;
/**
* Returns the uniform of this program whose name is given.
*
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment