diff options
Diffstat (limited to 'src/mesa/main/context.c')
-rw-r--r-- | src/mesa/main/context.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index b1f800f4c21..3bddf2570ec 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -597,6 +597,21 @@ _mesa_init_constants(GLcontext *ctx) ctx->Const.MaxVarying = MAX_VARYING; #endif + /* Shading language version */ + if (ctx->API == API_OPENGL) { +#if FEATURE_ARB_shading_language_120 + ctx->Const.GLSLVersion = 120; +#else + ctx->Const.GLSLVersion = 110; +#endif + } + else if (ctx->API == API_OPENGLES2) { + ctx->Const.GLSLVersion = 100; + } + else if (ctx->API == API_OPENGLES) { + ctx->Const.GLSLVersion = 0; /* GLSL not supported */ + } + /* GL_ARB_framebuffer_object */ ctx->Const.MaxSamples = 0; |