From 0fd97db8b077ad1bd5d26e86e67ebb2d58b6a38a Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 25 Jun 2010 14:27:07 -0700 Subject: glsl2: Associate the GLenum for the type with builtin GLSL types. --- src/glsl/glsl_types.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/glsl/glsl_types.h') diff --git a/src/glsl/glsl_types.h b/src/glsl/glsl_types.h index 39e6ac970a..93cf60be8d 100644 --- a/src/glsl/glsl_types.h +++ b/src/glsl/glsl_types.h @@ -30,6 +30,7 @@ #include extern "C" { +#include "GL/gl.h" #include } @@ -55,6 +56,7 @@ enum glsl_sampler_dim { struct glsl_type { + GLenum gl_type; unsigned base_type:4; unsigned sampler_dimensionality:3; @@ -151,8 +153,10 @@ struct glsl_type { /*@}*/ - glsl_type(unsigned base_type, unsigned vector_elements, + glsl_type(GLenum gl_type, + unsigned base_type, unsigned vector_elements, unsigned matrix_columns, const char *name) : + gl_type(gl_type), base_type(base_type), sampler_dimensionality(0), sampler_shadow(0), sampler_array(0), sampler_type(0), @@ -166,8 +170,10 @@ struct glsl_type { memset(& fields, 0, sizeof(fields)); } - glsl_type(enum glsl_sampler_dim dim, bool shadow, bool array, + glsl_type(GLenum gl_type, + enum glsl_sampler_dim dim, bool shadow, bool array, unsigned type, const char *name) : + gl_type(gl_type), base_type(GLSL_TYPE_SAMPLER), sampler_dimensionality(dim), sampler_shadow(shadow), sampler_array(array), sampler_type(type), -- cgit v1.2.3