]> git.tdb.fi Git - libs/gl.git/blobdiff - source/program.h
Store uniform information inside Program to reduce glGetUniformLocation calls
[libs/gl.git] / source / program.h
index 4ff3f53a41c149a2e2d411d25cd52f4ae6873260..80ddf15ca33e282ff71a17cd79695db4fd324972 100644 (file)
@@ -56,11 +56,20 @@ public:
                std::string create_flags() const;
        };
 
+       struct UniformInfo
+       {
+               std::string name;
+               int location;
+               int size;
+               GLenum type;
+       };
+
 private:
        unsigned id;
        std::list<Shader *> shaders;
        bool del_shaders;
        bool linked;
+       std::map<std::string, UniformInfo> uniforms;
 
 public:
        Program();