Implements support for retrieving uniforms by subscripted name.

TRAC #11796 Signed-off-by: Nicolas Capens Signed-off-by: Daniel Koch Author: Shannon Woods git-svn-id: https://angleproject.googlecode.com/svn/trunk@189 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent c5c15380
...@@ -36,6 +36,16 @@ struct Uniform ...@@ -36,6 +36,16 @@ struct Uniform
unsigned char *data; unsigned char *data;
}; };
// Struct used for correlating uniforms/elements of uniform arrays to handles
struct UniformLocation
{
UniformLocation(const std::string &name, unsigned int element, unsigned int index);
std::string name;
unsigned int element;
unsigned int index;
};
class Program class Program
{ {
public: public:
...@@ -167,6 +177,8 @@ class Program ...@@ -167,6 +177,8 @@ class Program
typedef std::vector<Uniform*> UniformArray; typedef std::vector<Uniform*> UniformArray;
UniformArray mUniforms; UniformArray mUniforms;
typedef std::vector<UniformLocation> UniformIndex;
UniformIndex mUniformIndex;
bool mLinked; bool mLinked;
bool mDeleteStatus; // Flag to indicate that the program can be deleted when no longer in use bool mDeleteStatus; // Flag to indicate that the program can be deleted when no longer in use
......
Markdown is supported
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