Adding a way to retrieve vertex attribute TType using TProgram reflection API (required in order to query location attributes).
This commit is contained in:
parent
fabe7d6a61
commit
32c294ed76
@ -1708,6 +1708,7 @@ int TProgram::getUniformArraySize(int index) const { return reflection
|
||||
int TProgram::getNumLiveAttributes() const { return reflection->getNumAttributes(); }
|
||||
const char* TProgram::getAttributeName(int index) const { return reflection->getAttribute(index).name.c_str(); }
|
||||
int TProgram::getAttributeType(int index) const { return reflection->getAttribute(index).glDefineType; }
|
||||
const TType* TProgram::getAttributeTType(int index) const { return reflection->getAttribute(index).getType(); }
|
||||
const TType* TProgram::getUniformTType(int index) const { return reflection->getUniform(index).getType(); }
|
||||
const TType* TProgram::getUniformBlockTType(int index) const { return reflection->getUniformBlock(index).getType(); }
|
||||
|
||||
|
@ -511,6 +511,7 @@ public:
|
||||
int getAttributeType(int index) const; // can be used for glGetActiveAttrib()
|
||||
const TType* getUniformTType(int index) const; // returns a TType*
|
||||
const TType* getUniformBlockTType(int index) const; // returns a TType*
|
||||
const TType* getAttributeTType(int index) const; // returns a TType*
|
||||
|
||||
void dumpReflection();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user