diff options
author | Roland Scheidegger <rscheidegger@gmx.ch> | 2006-03-01 23:11:14 +0000 |
---|---|---|
committer | Roland Scheidegger <rscheidegger@gmx.ch> | 2006-03-01 23:11:14 +0000 |
commit | 93da673904d4c520d3fbd2210e53777bf1598ac6 (patch) | |
tree | 74245a84790c47d6a37bc2c15f57d86398918695 /src/mesa/main/enable.c | |
parent | cf6be2d5bd7032d120424f8bc4c926d9d137d223 (diff) |
Fix glGet with enums which are used not only in NV_vertex_program, but other extensions too (ARB_vertex_program, ARB_fragment_program, NV_fragment_program), if no support for NV_vertex_program is present. While here, fix return value if enum is used which is not supported by the exposed extensions (GL_INVALID_ENUM instead of GL_INVALID_VALUE). Fix some compile-time #ifs depending on NV_vertex/fragment_program which should also be dependant on ARB_vertex/fragment_program. See bug #6070
Diffstat (limited to 'src/mesa/main/enable.c')
-rw-r--r-- | src/mesa/main/enable.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c index 931aa2cc26..5efbf46a75 100644 --- a/src/mesa/main/enable.c +++ b/src/mesa/main/enable.c @@ -821,7 +821,7 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state ) ctx->Point.PointSprite = state; break; -#if FEATURE_NV_vertex_program +#if FEATURE_NV_vertex_program || FEATURE_ARB_vertex_program case GL_VERTEX_PROGRAM_NV: CHECK_EXTENSION2(NV_vertex_program, ARB_vertex_program, cap); if (ctx->VertexProgram.Enabled == state) @@ -843,6 +843,8 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state ) FLUSH_VERTICES(ctx, _NEW_PROGRAM); ctx->VertexProgram.TwoSideEnabled = state; break; +#endif +#if FEATURE_NV_vertex_program case GL_MAP1_VERTEX_ATTRIB0_4_NV: case GL_MAP1_VERTEX_ATTRIB1_4_NV: case GL_MAP1_VERTEX_ATTRIB2_4_NV: @@ -1286,7 +1288,7 @@ _mesa_IsEnabled( GLenum cap ) case GL_POINT_SPRITE_NV: return ctx->Point.PointSprite; -#if FEATURE_NV_vertex_program +#if FEATURE_NV_vertex_program || FEATURE_ARB_vertex_program case GL_VERTEX_PROGRAM_NV: CHECK_EXTENSION(NV_vertex_program); return ctx->VertexProgram.Enabled; @@ -1296,6 +1298,8 @@ _mesa_IsEnabled( GLenum cap ) case GL_VERTEX_PROGRAM_TWO_SIDE_NV: CHECK_EXTENSION(NV_vertex_program); return ctx->VertexProgram.TwoSideEnabled; +#endif +#if FEATURE_NV_vertex_program case GL_VERTEX_ATTRIB_ARRAY0_NV: case GL_VERTEX_ATTRIB_ARRAY1_NV: case GL_VERTEX_ATTRIB_ARRAY2_NV: |