diff options
author | Ian Romanick <[email protected]> | 2011-10-11 16:11:40 -0700 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2011-11-07 13:33:15 -0800 |
commit | 68db407b20e780d3f45b90b01f1271b7bd7e7a2b (patch) | |
tree | 21779aef5c46732f3fbb4979f0d320dbcc3eecea /src/glsl | |
parent | 017346f4038671bd6725b857f6daeba821a8306b (diff) |
glsl: Allow glsl_types.h to be included in C sources
Some C code will want access to the glsl_base_type and
glsl_sampler_dim enums in the near future.
Signed-off-by: Ian Romanick <[email protected]>
Tested-by: Tom Stellard <[email protected]>
Diffstat (limited to 'src/glsl')
-rw-r--r-- | src/glsl/glsl_types.h | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/src/glsl/glsl_types.h b/src/glsl/glsl_types.h index 56b8efe7baa..efbf335066e 100644 --- a/src/glsl/glsl_types.h +++ b/src/glsl/glsl_types.h @@ -29,21 +29,23 @@ #include <string.h> #include <assert.h> -extern "C" { -#include "GL/gl.h" -} - -#include "ralloc.h" - struct _mesa_glsl_parse_state; struct glsl_symbol_table; -extern "C" void +#ifdef __cplusplus +extern "C" { +#endif + +extern void _mesa_glsl_initialize_types(struct _mesa_glsl_parse_state *state); -extern "C" void +extern void _mesa_glsl_release_types(void); +#ifdef __cplusplus +} +#endif + enum glsl_base_type { GLSL_TYPE_UINT = 0, GLSL_TYPE_INT, @@ -66,6 +68,9 @@ enum glsl_sampler_dim { GLSL_SAMPLER_DIM_EXTERNAL }; +#ifdef __cplusplus +#include "GL/gl.h" +#include "ralloc.h" struct glsl_type { GLenum gl_type; @@ -530,4 +535,6 @@ struct glsl_struct_field { const char *name; }; +#endif /* __cplusplus */ + #endif /* GLSL_TYPES_H */ |