diff options
author | Ian Romanick <ian.d.romanick@intel.com> | 2010-03-24 17:11:30 -0700 |
---|---|---|
committer | Ian Romanick <ian.d.romanick@intel.com> | 2010-03-24 17:11:30 -0700 |
commit | 3209c4e3692eaa9468aadcd21ce402e6b0d5b7dd (patch) | |
tree | 90f2bd3db967138bfb6620208050b18a53cdf0e3 /glsl_types.h | |
parent | 60b54d977a7b3df9612eb9232f6b5d6c3f393e2f (diff) |
Add glsl_type::get_instance method
Gets the singleton corresponding to a particular scalar, vector, or
matrix type.
Diffstat (limited to 'glsl_types.h')
-rw-r--r-- | glsl_types.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/glsl_types.h b/glsl_types.h index 4a92712b21..a7897719fb 100644 --- a/glsl_types.h +++ b/glsl_types.h @@ -148,6 +148,12 @@ struct glsl_type { const glsl_type *get_base_type() const; /** + * Get the instance of a built-in scalar, vector, or matrix type + */ + static const glsl_type *get_instance(unsigned base_type, unsigned rows, + unsigned columns); + + /** * Query whether or not a type is a scalar (non-vector and non-matrix). */ bool is_scalar() const |