Minor changes to get ready for OpenGL 2.1.
authorBrian Paul <brian.paul@tungstengraphics.com>
Fri, 3 Nov 2006 15:18:17 +0000 (15:18 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Fri, 3 Nov 2006 15:18:17 +0000 (15:18 +0000)
src/mesa/main/extensions.c
src/mesa/main/getstring.c
src/mesa/main/mtypes.h

index 081ec995d315687aecd0cbf439096dcfff5d98d5..135323f9c153e7d6ddeb466ec9fa8c2d157e7f3c 100644 (file)
@@ -58,6 +58,7 @@ static const struct {
    { OFF, "GL_ARB_point_sprite",               F(ARB_point_sprite) },
    { OFF, "GL_ARB_shader_objects",             F(ARB_shader_objects) },
    { OFF, "GL_ARB_shading_language_100",       F(ARB_shading_language_100) },
+   { OFF, "GL_ARB_shading_language_120",       F(ARB_shading_language_120) },
    { OFF, "GL_ARB_shadow",                     F(ARB_shadow) },
    { OFF, "GL_ARB_shadow_ambient",             F(SGIX_shadow_ambient) },
    { OFF, "GL_ARB_texture_border_clamp",       F(ARB_texture_border_clamp) },
index f68bbf2ff397c775e41d3bcadc5268f923b4f583..f033ddc895445b2829fd51ee424e31ce8a93c890 100644 (file)
@@ -55,6 +55,7 @@ _mesa_GetString( GLenum name )
    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;
+   static const char *version_2_1 = "1.5 Mesa " MESA_VERSION_STRING;
 
 #if FEATURE_ARB_shading_language_100
    static const char *sl_version_110 = "1.10 Mesa " MESA_VERSION_STRING;
@@ -114,7 +115,14 @@ _mesa_GetString( GLenum name )
                       ctx->Extensions.ARB_vertex_shader &&
                       ctx->Extensions.ARB_fragment_shader &&
                       ctx->Extensions.ARB_texture_non_power_of_two) {
-                     return (const GLubyte *) version_2_0;
+                     if (ctx->Extensions.ARB_shading_language_120 &&
+                         ctx->Extensions.EXT_pixel_buffer_object &&
+                         ctx->Extensions.EXT_texture_sRGB) {
+                        return (const GLubyte *) version_2_1;
+                     }
+                     else {
+                        return (const GLubyte *) version_2_0;
+                     }
                   }
                   else {
                      return (const GLubyte *) version_1_5;
index 1399dddf50c8c49185d7a7a819c13be12a7dc2b5..0ed73beb3c5fd820bf909f8329a8a1b510a4d364 100644 (file)
@@ -2406,6 +2406,7 @@ struct gl_extensions
    GLboolean ARB_point_sprite;
    GLboolean ARB_shader_objects;
    GLboolean ARB_shading_language_100;
+   GLboolean ARB_shading_language_120;
    GLboolean ARB_shadow;
    GLboolean ARB_texture_border_clamp;
    GLboolean ARB_texture_compression;