-public:
- typedef unsigned LayoutHash;
- struct UniformBlockInfo;
-
- struct UniformInfo
- {
- std::string name;
- const UniformBlockInfo *block;
- union
- {
- int location;
- unsigned offset;
- };
- unsigned array_size;
- unsigned array_stride;
- unsigned matrix_stride;
- DataType type;
-
- UniformInfo();
- };
-
- struct UniformBlockInfo
- {
- std::string name;
- unsigned data_size;
- int bind_point;
- std::vector<const UniformInfo *> uniforms;
- LayoutHash layout_hash;
-
- UniformBlockInfo();
- };
-
- struct AttributeInfo
- {
- std::string name;
- unsigned location;
- unsigned array_size;
- DataType type;
-
- AttributeInfo();
- };
-
-private:
- struct Bindings
- {
- std::map<std::string, unsigned> textures;
- std::map<std::string, unsigned> blocks;
- };
-
- unsigned id;
- std::vector<unsigned> stage_ids;
- const Module *module;
- Bindings *bindings;
- bool linked;
- std::vector<UniformBlockInfo> uniform_blocks;
- std::vector<UniformInfo> uniforms;
- LayoutHash uniform_layout_hash;
- std::vector<AttributeInfo> attributes;