summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/get.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2002-06-15 03:03:06 +0000
committerBrian Paul <[email protected]>2002-06-15 03:03:06 +0000
commit8afe7de8deaf3c9613fd68b344de8c52b02b1879 (patch)
treef600a192c9d0136faea8864a53eabc819eeb791f /src/mesa/main/get.c
parent8bdd0dc8d0e9c9cb2c71fbdd4c77e982cfc0b350 (diff)
Implemented GL_NV_texture_rectangle extension.
Replace struct gl_texure_object's Dimension w/ Target field. Added _EnabledUnits to struct gl_texture_attrib - the _ReallyEnabled field is obsolete, but still present for now. This effectively removes the 8-texture units limit, 32 units now possible, but unlikely! New TEXTURE_1D/2D/3D/CUBE/RECT_BIT tokens for unit->_ReallyEnabled field. Updated device drivers to use ctx->Texture._EnabledUnits.
Diffstat (limited to 'src/mesa/main/get.c')
-rw-r--r--src/mesa/main/get.c58
1 files changed, 57 insertions, 1 deletions
diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c
index 7f718a7b219..e723d18d5e1 100644
--- a/src/mesa/main/get.c
+++ b/src/mesa/main/get.c
@@ -1,4 +1,4 @@
-/* $Id: get.c,v 1.81 2002/06/15 02:38:15 brianp Exp $ */
+/* $Id: get.c,v 1.82 2002/06/15 03:03:08 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -1441,6 +1441,20 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params )
*params = 0;
break;
+ /* GL_NV_texture_rectangle */
+ case GL_TEXTURE_RECTANGLE_NV:
+ CHECK_EXTENSION_B(NV_texture_rectangle);
+ *params = _mesa_IsEnabled(GL_TEXTURE_RECTANGLE_NV);
+ break;
+ case GL_TEXTURE_BINDING_RECTANGLE_NV:
+ CHECK_EXTENSION_B(NV_texture_rectangle);
+ *params = INT_TO_BOOL(textureUnit->CurrentRect->Name);
+ break;
+ case GL_MAX_RECTANGLE_TEXTURE_SIZE_NV:
+ CHECK_EXTENSION_B(NV_texture_rectangle);
+ *params = INT_TO_BOOL(ctx->Const.MaxTextureRectSize);
+ break;
+
default:
_mesa_error( ctx, GL_INVALID_ENUM, "glGetBooleanv" );
}
@@ -2677,6 +2691,20 @@ _mesa_GetDoublev( GLenum pname, GLdouble *params )
/* GL_NV_vertex_program */
/* XXX to do */
+ /* GL_NV_texture_rectangle */
+ case GL_TEXTURE_RECTANGLE_NV:
+ CHECK_EXTENSION_D(NV_texture_rectangle);
+ *params = (GLdouble) _mesa_IsEnabled(GL_TEXTURE_RECTANGLE_NV);
+ break;
+ case GL_TEXTURE_BINDING_RECTANGLE_NV:
+ CHECK_EXTENSION_D(NV_texture_rectangle);
+ *params = (GLdouble) textureUnit->CurrentRect->Name;
+ break;
+ case GL_MAX_RECTANGLE_TEXTURE_SIZE_NV:
+ CHECK_EXTENSION_D(NV_texture_rectangle);
+ *params = (GLdouble) ctx->Const.MaxTextureRectSize;
+ break;
+
default:
_mesa_error( ctx, GL_INVALID_ENUM, "glGetDoublev" );
}
@@ -3896,6 +3924,20 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params )
/* GL_NV_vertex_program */
/* XXX to do */
+ /* GL_NV_texture_rectangle */
+ case GL_TEXTURE_RECTANGLE_NV:
+ CHECK_EXTENSION_F(NV_texture_rectangle);
+ *params = (GLfloat) _mesa_IsEnabled(GL_TEXTURE_RECTANGLE_NV);
+ break;
+ case GL_TEXTURE_BINDING_RECTANGLE_NV:
+ CHECK_EXTENSION_F(NV_texture_rectangle);
+ *params = (GLfloat) textureUnit->CurrentRect->Name;
+ break;
+ case GL_MAX_RECTANGLE_TEXTURE_SIZE_NV:
+ CHECK_EXTENSION_F(NV_texture_rectangle);
+ *params = (GLfloat) ctx->Const.MaxTextureRectSize;
+ break;
+
default:
GET_FLOAT_ERROR;
}
@@ -5153,6 +5195,20 @@ _mesa_GetIntegerv( GLenum pname, GLint *params )
/* GL_NV_vertex_program */
/* XXX to do */
+ /* GL_NV_texture_rectangle */
+ case GL_TEXTURE_RECTANGLE_NV:
+ CHECK_EXTENSION_I(NV_texture_rectangle);
+ *params = (GLint) _mesa_IsEnabled(GL_TEXTURE_RECTANGLE_NV);
+ break;
+ case GL_TEXTURE_BINDING_RECTANGLE_NV:
+ CHECK_EXTENSION_I(NV_texture_rectangle);
+ *params = (GLint) textureUnit->CurrentRect->Name;
+ break;
+ case GL_MAX_RECTANGLE_TEXTURE_SIZE_NV:
+ CHECK_EXTENSION_I(NV_texture_rectangle);
+ *params = (GLint) ctx->Const.MaxTextureRectSize;
+ break;
+
default:
_mesa_error( ctx, GL_INVALID_ENUM, "glGetIntegerv" );
}