diff options
author | Brian Paul <[email protected]> | 2005-05-04 20:11:35 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2005-05-04 20:11:35 +0000 |
commit | e4b2356c07d31fbeeabb13b2fb47db703b473080 (patch) | |
tree | d8b7f1c7c9e7c84d84349485f942dd205dd4c16d /src/mesa/main/enable.c | |
parent | ebef61f5c0950572f9c6a81b08f447957461675c (diff) |
Major check-in of changes for GL_EXT_framebuffer_object extension.
Main driver impacts:
- new code for creating the Mesa GLframebuffer
- new span/pixel read/write code
Some drivers not yet updated/tested.
Diffstat (limited to 'src/mesa/main/enable.c')
-rw-r--r-- | src/mesa/main/enable.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c index f53ae05d171..671db68ce84 100644 --- a/src/mesa/main/enable.c +++ b/src/mesa/main/enable.c @@ -301,7 +301,7 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state ) break; case GL_DEPTH_TEST: - if (state && ctx->Visual.depthBits==0) { + if (state && ctx->DrawBuffer->Visual.depthBits == 0) { _mesa_warning(ctx,"glEnable(GL_DEPTH_TEST) but no depth buffer"); return; } @@ -575,7 +575,7 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state ) ctx->Texture.SharedPalette = state; break; case GL_STENCIL_TEST: - if (state && ctx->Visual.stencilBits==0) { + if (state && ctx->DrawBuffer->Visual.stencilBits == 0) { _mesa_warning(ctx, "glEnable(GL_STENCIL_TEST) but no stencil buffer"); return; @@ -591,7 +591,8 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state ) GLuint newenabled = texUnit->Enabled & ~TEXTURE_1D_BIT; if (state) newenabled |= TEXTURE_1D_BIT; - if (!ctx->Visual.rgbMode || texUnit->Enabled == newenabled) + if (!ctx->DrawBuffer->Visual.rgbMode + || texUnit->Enabled == newenabled) return; FLUSH_VERTICES(ctx, _NEW_TEXTURE); texUnit->Enabled = newenabled; @@ -603,7 +604,8 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state ) GLuint newenabled = texUnit->Enabled & ~TEXTURE_2D_BIT; if (state) newenabled |= TEXTURE_2D_BIT; - if (!ctx->Visual.rgbMode || texUnit->Enabled == newenabled) + if (!ctx->DrawBuffer->Visual.rgbMode + || texUnit->Enabled == newenabled) return; FLUSH_VERTICES(ctx, _NEW_TEXTURE); texUnit->Enabled = newenabled; @@ -615,7 +617,8 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state ) GLuint newenabled = texUnit->Enabled & ~TEXTURE_3D_BIT; if (state) newenabled |= TEXTURE_3D_BIT; - if (!ctx->Visual.rgbMode || texUnit->Enabled == newenabled) + if (!ctx->DrawBuffer->Visual.rgbMode + || texUnit->Enabled == newenabled) return; FLUSH_VERTICES(ctx, _NEW_TEXTURE); texUnit->Enabled = newenabled; @@ -777,7 +780,8 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state ) CHECK_EXTENSION(ARB_texture_cube_map, cap); if (state) newenabled |= TEXTURE_CUBE_BIT; - if (!ctx->Visual.rgbMode || texUnit->Enabled == newenabled) + if (!ctx->DrawBuffer->Visual.rgbMode + || texUnit->Enabled == newenabled) return; FLUSH_VERTICES(ctx, _NEW_TEXTURE); texUnit->Enabled = newenabled; @@ -938,7 +942,8 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state ) CHECK_EXTENSION(NV_texture_rectangle, cap); if (state) newenabled |= TEXTURE_RECT_BIT; - if (!ctx->Visual.rgbMode || texUnit->Enabled == newenabled) + if (!ctx->DrawBuffer->Visual.rgbMode + || texUnit->Enabled == newenabled) return; FLUSH_VERTICES(ctx, _NEW_TEXTURE); texUnit->Enabled = newenabled; @@ -972,7 +977,7 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state ) /* GL_EXT_depth_bounds_test */ case GL_DEPTH_BOUNDS_TEST_EXT: CHECK_EXTENSION(EXT_depth_bounds_test, cap); - if (state && ctx->Visual.depthBits==0) { + if (state && ctx->DrawBuffer->Visual.depthBits == 0) { _mesa_warning(ctx, "glEnable(GL_DEPTH_BOUNDS_TEST_EXT) but no depth buffer"); return; |