summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/enable.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2000-05-22 16:33:20 +0000
committerBrian Paul <[email protected]>2000-05-22 16:33:20 +0000
commit86fc370d399167ec9bb978d053d4a72215c86c16 (patch)
tree41269faf262faf74f878896f562513ef580db98c /src/mesa/main/enable.c
parent87a7897d38fe1fa4458901d15475e3306270b51e (diff)
initial code for GL_ARB_texture_cube_map
Diffstat (limited to 'src/mesa/main/enable.c')
-rw-r--r--src/mesa/main/enable.c42
1 files changed, 41 insertions, 1 deletions
diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c
index e49528e0ae3..b4df44de34f 100644
--- a/src/mesa/main/enable.c
+++ b/src/mesa/main/enable.c
@@ -1,4 +1,4 @@
-/* $Id: enable.c,v 1.19 2000/05/07 20:41:30 brianp Exp $ */
+/* $Id: enable.c,v 1.20 2000/05/22 16:33:21 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -506,6 +506,26 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state )
ctx->Pixel.Separable2DEnabled = state;
break;
+ /* GL_ARB_texture_cube_map */
+ case GL_TEXTURE_CUBE_MAP_ARB:
+#if 0
+ 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_2D;
+ ctx->Enabled |= flag;
+ }
+ else {
+ texUnit->Enabled &= ~TEXTURE0_2D;
+ ctx->Enabled &= ~flag;
+ }
+ }
+ break;
+#endif
+
default:
if (state) {
gl_error( ctx, GL_INVALID_ENUM, "glEnable" );
@@ -738,6 +758,26 @@ _mesa_IsEnabled( GLenum cap )
case GL_SEPARABLE_2D:
return ctx->Pixel.Separable2DEnabled;
+ /* GL_ARB_texture_cube_map */
+ case GL_TEXTURE_CUBE_MAP_ARB:
+#if 0
+ 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_2D;
+ ctx->Enabled |= flag;
+ }
+ else {
+ texUnit->Enabled &= ~TEXTURE0_2D;
+ ctx->Enabled &= ~flag;
+ }
+ }
+ break;
+#endif
+
default:
gl_error( ctx, GL_INVALID_ENUM, "glIsEnabled" );
return GL_FALSE;