summaryrefslogtreecommitdiffstats
path: root/src/glsl
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2010-06-28 11:57:38 -0700
committerIan Romanick <[email protected]>2010-06-29 11:15:39 -0700
commit72e627d02a78cbf40c861384293e355588fd0977 (patch)
tree48ba01444e640c2ad9119e744bf969cebe097096 /src/glsl
parent49e3577b91f44013746f7a3db411e7041b7d899e (diff)
glsl_type: Record type constructors are private
Diffstat (limited to 'src/glsl')
-rw-r--r--src/glsl/glsl_types.cpp12
-rw-r--r--src/glsl/glsl_types.h16
2 files changed, 16 insertions, 12 deletions
diff --git a/src/glsl/glsl_types.cpp b/src/glsl/glsl_types.cpp
index 672a7f7cd17..f910efdddef 100644
--- a/src/glsl/glsl_types.cpp
+++ b/src/glsl/glsl_types.cpp
@@ -65,6 +65,18 @@ glsl_type::glsl_type(GLenum gl_type,
memset(& fields, 0, sizeof(fields));
}
+glsl_type::glsl_type(const glsl_struct_field *fields, unsigned num_fields,
+ const char *name) :
+ base_type(GLSL_TYPE_STRUCT),
+ sampler_dimensionality(0), sampler_shadow(0), sampler_array(0),
+ sampler_type(0),
+ vector_elements(0), matrix_columns(0),
+ name(name),
+ length(num_fields)
+{
+ this->fields.structure = fields;
+}
+
static void
add_types_to_symbol_table(glsl_symbol_table *symtab,
const struct glsl_type *types,
diff --git a/src/glsl/glsl_types.h b/src/glsl/glsl_types.h
index a1c9fae4f9f..fc94bea1ccc 100644
--- a/src/glsl/glsl_types.h
+++ b/src/glsl/glsl_types.h
@@ -158,18 +158,6 @@ struct glsl_type {
/*@}*/
- glsl_type(const glsl_struct_field *fields, unsigned num_fields,
- const char *name) :
- base_type(GLSL_TYPE_STRUCT),
- sampler_dimensionality(0), sampler_shadow(0), sampler_array(0),
- sampler_type(0),
- vector_elements(0), matrix_columns(0),
- name(name),
- length(num_fields)
- {
- this->fields.structure = fields;
- }
-
/**
* For numeric and boolean derrived types returns the basic scalar type
*
@@ -404,6 +392,10 @@ private:
enum glsl_sampler_dim dim, bool shadow, bool array,
unsigned type, const char *name);
+ /** Constructor for record types */
+ glsl_type(const glsl_struct_field *fields, unsigned num_fields,
+ const char *name);
+
/** Constructor for array types */
glsl_type(void *ctx, const glsl_type *array, unsigned length);