aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main/enable.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2004-08-18 18:45:25 +0000
committerBrian Paul <[email protected]>2004-08-18 18:45:25 +0000
commitefb2ade520f47187ac70abe57185358017b63caa (patch)
tree0964187c51c76aad92f9e3a459c098c8ad0bc399 /src/mesa/main/enable.c
parente41460bf774f5afb4ec60b9c4f70e3dd0d80ef94 (diff)
check for either GL_NV_vertex_program or GL_ARB_vertex_program for some enables
Diffstat (limited to 'src/mesa/main/enable.c')
-rw-r--r--src/mesa/main/enable.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c
index 25bb7938c01..8d244e02e5b 100644
--- a/src/mesa/main/enable.c
+++ b/src/mesa/main/enable.c
@@ -5,9 +5,9 @@
/*
* Mesa 3-D graphics library
- * Version: 5.1
+ * Version: 6.1
*
- * Copyright (C) 1999-2003 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2004 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -48,13 +48,6 @@
return; \
}
-#define CHECK_EXTENSION2(EXT1, EXT2, CAP) \
- if (!ctx->Extensions.EXT1 && !ctx->Extensions.EXT2) { \
- _mesa_error(ctx, GL_INVALID_ENUM, "gl%sClientState(0x%x)", \
- state ? "Enable" : "Disable", CAP); \
- return; \
- }
-
static void
client_state( GLcontext *ctx, GLenum cap, GLboolean state )
@@ -192,6 +185,14 @@ _mesa_DisableClientState( GLenum cap )
return; \
}
+#define CHECK_EXTENSION2(EXT1, EXT2, CAP) \
+ if (!ctx->Extensions.EXT1 && !ctx->Extensions.EXT2) { \
+ _mesa_error(ctx, GL_INVALID_ENUM, "gl%s(0x%x)", \
+ state ? "Enable" : "Disable", CAP); \
+ return; \
+ }
+
+
/**
* Perform glEnable() and glDisable() calls.
@@ -852,21 +853,21 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state )
#if FEATURE_NV_vertex_program
case GL_VERTEX_PROGRAM_NV:
- CHECK_EXTENSION(NV_vertex_program, cap);
+ CHECK_EXTENSION2(NV_vertex_program, ARB_vertex_program, cap);
if (ctx->VertexProgram.Enabled == state)
return;
FLUSH_VERTICES(ctx, _NEW_PROGRAM);
ctx->VertexProgram.Enabled = state;
break;
case GL_VERTEX_PROGRAM_POINT_SIZE_NV:
- CHECK_EXTENSION(NV_vertex_program, cap);
+ CHECK_EXTENSION2(NV_vertex_program, ARB_vertex_program, cap);
if (ctx->VertexProgram.PointSizeEnabled == state)
return;
FLUSH_VERTICES(ctx, _NEW_PROGRAM);
ctx->VertexProgram.PointSizeEnabled = state;
break;
case GL_VERTEX_PROGRAM_TWO_SIDE_NV:
- CHECK_EXTENSION(NV_vertex_program, cap);
+ CHECK_EXTENSION2(NV_vertex_program, ARB_vertex_program, cap);
if (ctx->VertexProgram.TwoSideEnabled == state)
return;
FLUSH_VERTICES(ctx, _NEW_PROGRAM);