summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichal Krol <mjkrol@gmail.org>2006-04-04 10:08:27 +0000
committerMichal Krol <mjkrol@gmail.org>2006-04-04 10:08:27 +0000
commit1a5fecb4d6975418da055891f6899a9f4aaa0b31 (patch)
tree788a7fc106813f14ddac810c5ef7f2e7c44e9cc2 /src
parentae76be49eb4954a691b765077fc77875964b37e1 (diff)
Return GLSL version string (1.10).
Diffstat (limited to 'src')
-rw-r--r--src/mesa/main/getstring.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/mesa/main/getstring.c b/src/mesa/main/getstring.c
index 5188a79c95..423466aef3 100644
--- a/src/mesa/main/getstring.c
+++ b/src/mesa/main/getstring.c
@@ -54,7 +54,8 @@ _mesa_GetString( GLenum name )
static const char *version_1_3 = "1.3 Mesa " MESA_VERSION_STRING;
static const char *version_1_4 = "1.4 Mesa " MESA_VERSION_STRING;
static const char *version_1_5 = "1.5 Mesa " MESA_VERSION_STRING;
- static const char *version_2_0 = "1.5 Mesa " MESA_VERSION_STRING;/*XXX FIX*/
+ static const char *version_2_0 = "1.5 Mesa " MESA_VERSION_STRING;/*XXX FIX*/
+ static const char *sl_version_110 = "1.10 Mesa " MESA_VERSION_STRING;
ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, NULL);
@@ -125,7 +126,13 @@ _mesa_GetString( GLenum name )
case GL_EXTENSIONS:
if (!ctx->Extensions.String)
ctx->Extensions.String = _mesa_make_extension_string(ctx);
- return (const GLubyte *) ctx->Extensions.String;
+ return (const GLubyte *) ctx->Extensions.String;
+#if FEATURE_ARB_shading_language_100
+ case GL_SHADING_LANGUAGE_VERSION_ARB:
+ if (ctx->Extensions.ARB_shading_language_100)
+ return (const GLubyte *) sl_version_110;
+ goto error;
+#endif
#if FEATURE_NV_fragment_program || FEATURE_ARB_fragment_program || \
FEATURE_NV_vertex_program || FEATURE_ARB_vertex_program
case GL_PROGRAM_ERROR_STRING_NV:
@@ -136,7 +143,8 @@ _mesa_GetString( GLenum name )
return (const GLubyte *) ctx->Program.ErrorString;
}
/* FALL-THROUGH */
-#endif
+#endif
+ error:
default:
_mesa_error( ctx, GL_INVALID_ENUM, "glGetString" );
return (const GLubyte *) 0;