summaryrefslogtreecommitdiff
path: root/xc/extras/Mesa/src/enable.c
diff options
context:
space:
mode:
Diffstat (limited to 'xc/extras/Mesa/src/enable.c')
-rw-r--r--xc/extras/Mesa/src/enable.c57
1 files changed, 57 insertions, 0 deletions
diff --git a/xc/extras/Mesa/src/enable.c b/xc/extras/Mesa/src/enable.c
index 6c2220044..97554430e 100644
--- a/xc/extras/Mesa/src/enable.c
+++ b/xc/extras/Mesa/src/enable.c
@@ -494,6 +494,44 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state )
ctx->Pixel.PostColorMatrixColorTableEnabled = state;
break;
+ /* GL_EXT_convolution */
+ case GL_CONVOLUTION_1D:
+ ctx->Pixel.Convolution1DEnabled = state;
+ break;
+ case GL_CONVOLUTION_2D:
+ ctx->Pixel.Convolution2DEnabled = state;
+ break;
+ case GL_SEPARABLE_2D:
+ ctx->Pixel.Separable2DEnabled = state;
+ break;
+
+ /* GL_ARB_texture_cube_map */
+ case GL_TEXTURE_CUBE_MAP_ARB:
+ if (ctx->Extensions.HaveTextureCubeMap) {
+ if (ctx->Visual->RGBAflag) {
+ const GLuint curr = ctx->Texture.CurrentUnit;
+ const GLuint flag = TEXTURE0_CUBE << (curr * 4);
+ struct gl_texture_unit *texUnit = &ctx->Texture.Unit[curr];
+ ctx->NewState |= NEW_TEXTURE_ENABLE;
+ if (state) {
+ texUnit->Enabled |= TEXTURE0_CUBE;
+ ctx->Enabled |= flag;
+ }
+ else {
+ texUnit->Enabled &= ~TEXTURE0_CUBE;
+ ctx->Enabled &= ~flag;
+ }
+ }
+ }
+ else {
+ if (state)
+ gl_error(ctx, GL_INVALID_ENUM, "glEnable");
+ else
+ gl_error(ctx, GL_INVALID_ENUM, "glDisable");
+ return;
+ }
+ break;
+
default:
if (state) {
gl_error( ctx, GL_INVALID_ENUM, "glEnable" );
@@ -718,6 +756,25 @@ _mesa_IsEnabled( GLenum cap )
case GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI:
return ctx->Pixel.PostColorMatrixColorTableEnabled;
+ /* GL_EXT_convolution */
+ case GL_CONVOLUTION_1D:
+ return ctx->Pixel.Convolution1DEnabled;
+ case GL_CONVOLUTION_2D:
+ return ctx->Pixel.Convolution2DEnabled;
+ case GL_SEPARABLE_2D:
+ return ctx->Pixel.Separable2DEnabled;
+
+ /* GL_ARB_texture_cube_map */
+ case GL_TEXTURE_CUBE_MAP_ARB:
+ if (ctx->Extensions.HaveTextureCubeMap) {
+ const struct gl_texture_unit *texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
+ return (texUnit->Enabled & TEXTURE0_CUBE) ? GL_TRUE : GL_FALSE;
+ }
+ else {
+ gl_error(ctx, GL_INVALID_ENUM, "glIsEnabled");
+ return GL_FALSE;
+ }
+
default:
gl_error( ctx, GL_INVALID_ENUM, "glIsEnabled" );
return GL_FALSE;