diff options
author | Kenneth Graunke <[email protected]> | 2010-08-16 12:34:53 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2010-09-07 17:30:37 -0700 |
commit | 719caa403ecc3345b86708f8172600d80132d6cb (patch) | |
tree | e69d295f4e4644e709bf281ba174b32245d8302f /src/glsl/glsl_parser_extras.cpp | |
parent | 814c89abdbcd5b841b98746af921796df0362238 (diff) |
glsl: Accept language version 100 and make it the default on ES2.
Diffstat (limited to 'src/glsl/glsl_parser_extras.cpp')
-rw-r--r-- | src/glsl/glsl_parser_extras.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/glsl/glsl_parser_extras.cpp b/src/glsl/glsl_parser_extras.cpp index 37401dd8b88..d6ad8cb7333 100644 --- a/src/glsl/glsl_parser_extras.cpp +++ b/src/glsl/glsl_parser_extras.cpp @@ -54,9 +54,17 @@ _mesa_glsl_parse_state::_mesa_glsl_parse_state(struct __GLcontextRec *ctx, /* Set default language version and extensions */ this->language_version = 110; + this->es_shader = false; this->ARB_texture_rectangle_enable = true; if (ctx != NULL) { + /* OpenGL ES 2.0 has different defaults from desktop GL. */ + if (ctx->API == API_OPENGLES2) { + this->language_version = 100; + this->es_shader = true; + this->ARB_texture_rectangle_enable = false; + } + this->extensions = &ctx->Extensions; this->Const.MaxLights = ctx->Const.MaxLights; |