-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;
- Tag tag;
- int binding;
-
- 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:
- enum Stage
- {
- VERTEX,
- GEOMETRY,
- FRAGMENT,
- MAX_STAGES
- };
-
- struct TransientData
- {
- std::map<std::string, unsigned> textures;
- std::map<std::string, unsigned> blocks;
- std::map<unsigned, int> spec_values;
- };
-
- unsigned id;
- unsigned stage_ids[MAX_STAGES];
- const Module *module;
- TransientData *transient;
- bool linked;
- std::vector<UniformBlockInfo> uniform_blocks;
- std::vector<UniformInfo> uniforms;
- LayoutHash uniform_layout_hash;
- std::vector<AttributeInfo> attributes;
- std::string debug_name;