summaryrefslogtreecommitdiff
path: root/glsl_types.h
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2010-04-19 15:40:01 -0700
committerIan Romanick <ian.d.romanick@intel.com>2010-04-28 18:22:54 -0700
commit8f755dcb67848966c350883ad6fbb50547d9ec24 (patch)
tree7deb0516859960cfdc02a72a1cc65d0020f40905 /glsl_types.h
parent3455ce614424a5a23a23037e23d0454e476bceea (diff)
Add glsl_type::field_type
Query the type of a structure field
Diffstat (limited to 'glsl_types.h')
-rw-r--r--glsl_types.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/glsl_types.h b/glsl_types.h
index 2bdfeb8..1f8559a 100644
--- a/glsl_types.h
+++ b/glsl_types.h
@@ -332,6 +332,17 @@ struct glsl_type {
: error_type;
}
+
+ /**
+ * Get the type of a structure field
+ *
+ * \return
+ * Pointer to the type of the named field. If the type is not a structure
+ * or the named field does not exist, \c glsl_type::error_type is returned.
+ */
+ const glsl_type *field_type(const char *name) const;
+
+
/**
* Query the number of elements in an array type
*