-/* $Id: enable.c,v 1.17 2000/05/05 23:41:52 brianp Exp $ */
+/* $Id: enable.c,v 1.21 2000/05/23 15:17:12 brianp Exp $ */
/*
* Mesa 3-D graphics library
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" );
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;