summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/get.c
diff options
context:
space:
mode:
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" );
}