diff options
author | Brian Paul <[email protected]> | 2009-12-29 16:30:54 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2009-12-29 20:51:20 -0700 |
commit | 8f6f1124634cf659dde4c75549b84e35505d892d (patch) | |
tree | 2a41c7324530fca4c320fd6b4592bf5df83f51b6 /src/mesa/main/enable.c | |
parent | a856d635d300f842e9fa6413b0255bdb64142838 (diff) |
mesa: added infrastructure for GL_EXT_draw_buffers2
Diffstat (limited to 'src/mesa/main/enable.c')
-rw-r--r-- | src/mesa/main/enable.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c index 6f9f57f5cb8..cd6e881ad2d 100644 --- a/src/mesa/main/enable.c +++ b/src/mesa/main/enable.c @@ -1033,6 +1033,9 @@ _mesa_set_enablei(GLcontext *ctx, GLenum cap, GLuint index, GLboolean state) ASSERT(state == 0 || state == 1); switch (cap) { case GL_BLEND: + if (!ctx->Extensions.EXT_draw_buffers2) { + goto bad_cap_error; + } if (index >= ctx->Const.MaxDrawBuffers) { _mesa_error(ctx, GL_INVALID_VALUE, "%s(index=%u)", state ? "glEnableIndexed" : "glDisableIndexed", index); @@ -1047,10 +1050,14 @@ _mesa_set_enablei(GLcontext *ctx, GLenum cap, GLuint index, GLboolean state) } break; default: - _mesa_error(ctx, GL_INVALID_ENUM, "%s(cap=%s)", - state ? "glEnableIndexed" : "glDisableIndexed", - _mesa_lookup_enum_by_nr(cap)); + goto bad_cap_error; } + return; + +bad_cap_error: + _mesa_error(ctx, GL_INVALID_ENUM, "%s(cap=%s)", + state ? "glEnablei" : "glDisablei", + _mesa_lookup_enum_by_nr(cap)); } |