Add options to control how reflection information is built

This commit is contained in:
baldurk 2019-01-29 15:45:56 +00:00
parent 1dc5dcf0a5
commit 6d47785825
4 changed files with 17 additions and 5 deletions

View file

@ -55,7 +55,7 @@ class TReflectionTraverser;
// The full reflection database
class TReflection {
public:
TReflection() : badReflection(TObjectReflection::badReflection())
TReflection(EShReflectionOptions opts) : options(opts), badReflection(TObjectReflection::badReflection())
{
for (int dim=0; dim<3; ++dim)
localSize[dim] = 0;
@ -125,6 +125,8 @@ protected:
typedef std::map<std::string, int> TNameToIndex;
typedef std::vector<TObjectReflection> TMapIndexToReflection;
EShReflectionOptions options;
TObjectReflection badReflection; // return for queries of -1 or generally out of range; has expected descriptions with in it for this
TNameToIndex nameToIndex; // maps names to indexes; can hold all types of data: uniform/buffer and which function names have been processed
TMapIndexToReflection indexToUniform;