diff options
author | Brian Paul <brianp@vmware.com> | 2010-10-21 19:05:40 -0600 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2010-10-21 19:05:47 -0600 |
commit | 69a07be3e527dbc2148a4e20c50e60266225f5f2 (patch) | |
tree | 82583b98708fc7a6c33b471d45670e2566ed0daf /src/mesa/main/enable.c | |
parent | 1d91f8d9164b38b4c924f43ec4fc5ceb65c96a78 (diff) | |
parent | b2d4dfe5cc5b24743175bf35285dfc57f86bc09d (diff) |
Merge branch 'primitive-restart-cleanup'
Conflicts:
docs/relnotes-7.10.html
This branch is a re-do of the primitive-restart branch with all
the intermediate/temporary stuff cleaned out.
Diffstat (limited to 'src/mesa/main/enable.c')
-rw-r--r-- | src/mesa/main/enable.c | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c index 5a5b199df3..af16c010b9 100644 --- a/src/mesa/main/enable.c +++ b/src/mesa/main/enable.c @@ -124,6 +124,14 @@ client_state(struct gl_context *ctx, GLenum cap, GLboolean state) break; #endif /* FEATURE_NV_vertex_program */ + /* GL_NV_primitive_restart */ + case GL_PRIMITIVE_RESTART_NV: + if (!ctx->Extensions.NV_primitive_restart) { + goto invalid_enum_error; + } + var = &ctx->Array.PrimitiveRestart; + break; + default: goto invalid_enum_error; } @@ -945,9 +953,11 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state) break; #endif - /* GL 3.1 primitive restart */ + /* GL 3.1 primitive restart. Note: this enum is different from + * GL_PRIMITIVE_RESTART_NV (which is client state). + */ case GL_PRIMITIVE_RESTART: - if (ctx->VersionMajor * 10 + ctx->VersionMinor < 31) { + if (ctx->VersionMajor * 10 + ctx->VersionMinor < 31) { goto invalid_enum_error; } if (ctx->Array.PrimitiveRestart != state) { @@ -1454,9 +1464,16 @@ _mesa_IsEnabled( GLenum cap ) return ctx->TransformFeedback.RasterDiscard; #endif + /* GL_NV_primitive_restart */ + case GL_PRIMITIVE_RESTART_NV: + if (!ctx->Extensions.NV_primitive_restart) { + goto invalid_enum_error; + } + return ctx->Array.PrimitiveRestart; + /* GL 3.1 primitive restart */ case GL_PRIMITIVE_RESTART: - if (ctx->VersionMajor * 10 + ctx->VersionMinor < 31) { + if (ctx->VersionMajor * 10 + ctx->VersionMinor < 31) { goto invalid_enum_error; } return ctx->Array.PrimitiveRestart; |