]> git.tdb.fi Git - libs/gl.git/blobdiff - source/core/program.h
Rename some things in Program
[libs/gl.git] / source / core / program.h
index 6f84cfd26436e314b6d48d02dac8e7c0e2b51154..48c18d0f56333371130710942a4dbdc9076e9f45 100644 (file)
@@ -63,11 +63,17 @@ public:
        {
                std::string name;
                const UniformBlockInfo *block;
-               unsigned location;
+               union
+               {
+                       int location;
+                       unsigned offset;
+               };
                unsigned array_size;
                unsigned array_stride;
                unsigned matrix_stride;
                DataType type;
+
+               UniformInfo();
        };
 
        struct UniformBlockInfo
@@ -77,6 +83,8 @@ public:
                int bind_point;
                std::vector<const UniformInfo *> uniforms;
                LayoutHash layout_hash;
+
+               UniformBlockInfo();
        };
 
        struct AttributeInfo
@@ -85,6 +93,8 @@ public:
                unsigned location;
                unsigned array_size;
                DataType type;
+
+               AttributeInfo();
        };
 
        typedef std::map<std::string, UniformInfo> UniformMap;