summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/get.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2000-08-08 16:15:14 +0000
committerBrian Paul <[email protected]>2000-08-08 16:15:14 +0000
commit042066887b09f81435f96c2a14702355d05d8290 (patch)
tree00a14ef264f12dd834795d67ceb9042f310f225a /src/mesa/main/get.c
parent507d83e4cc0eb2fbc4a5ce3b87ed0b40634df5a8 (diff)
added GetInteger/Float/Double/Boolean/Pointer device driver functions
Diffstat (limited to 'src/mesa/main/get.c')
-rw-r--r--src/mesa/main/get.c42
1 files changed, 38 insertions, 4 deletions
diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c
index 7e71d6528e1..29124d88b1c 100644
--- a/src/mesa/main/get.c
+++ b/src/mesa/main/get.c
@@ -1,8 +1,8 @@
-/* $Id: get.c,v 1.30 2000/07/21 15:41:08 brianp Exp $ */
+/* $Id: get.c,v 1.31 2000/08/08 16:15:14 brianp Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 3.3
+ * Version: 3.5
*
* Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
*
@@ -92,9 +92,16 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params )
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glGetBooleanv");
+ if (!params)
+ return;
+
if (MESA_VERBOSE & VERBOSE_API)
fprintf(stderr, "glGetBooleanv %s\n", gl_lookup_enum_by_nr(pname));
+ if (ctx->Driver.GetBooleanv
+ && (*ctx->Driver.GetBooleanv)(ctx, pname, params))
+ return;
+
switch (pname) {
case GL_ACCUM_RED_BITS:
*params = INT_TO_BOOL(ctx->Visual->AccumRedBits);
@@ -1235,9 +1242,15 @@ _mesa_GetDoublev( GLenum pname, GLdouble *params )
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glGetDoublev");
+ if (!params)
+ return;
+
if (MESA_VERBOSE & VERBOSE_API)
fprintf(stderr, "glGetDoublev %s\n", gl_lookup_enum_by_nr(pname));
+ if (ctx->Driver.GetDoublev && (*ctx->Driver.GetDoublev)(ctx, pname, params))
+ return;
+
switch (pname) {
case GL_ACCUM_RED_BITS:
*params = (GLdouble) ctx->Visual->AccumRedBits;
@@ -2378,9 +2391,15 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params )
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glGetFloatv");
+ if (!params)
+ return;
+
if (MESA_VERBOSE & VERBOSE_API)
fprintf(stderr, "glGetFloatv %s\n", gl_lookup_enum_by_nr(pname));
+ if (ctx->Driver.GetFloatv && (*ctx->Driver.GetFloatv)(ctx, pname, params))
+ return;
+
switch (pname) {
case GL_ACCUM_RED_BITS:
*params = (GLfloat) ctx->Visual->AccumRedBits;
@@ -3492,9 +3511,16 @@ _mesa_GetIntegerv( GLenum pname, GLint *params )
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glGetIntegerv");
+ if (!params)
+ return;
+
if (MESA_VERBOSE & VERBOSE_API)
fprintf(stderr, "glGetIntegerv %s\n", gl_lookup_enum_by_nr(pname));
+ if (ctx->Driver.GetIntegerv
+ && (*ctx->Driver.GetIntegerv)(ctx, pname, params))
+ return;
+
switch (pname) {
case GL_ACCUM_RED_BITS:
*params = (GLint) ctx->Visual->AccumRedBits;
@@ -4629,11 +4655,19 @@ _mesa_GetPointerv( GLenum pname, GLvoid **params )
{
GET_CURRENT_CONTEXT(ctx);
GLuint texUnit = ctx->Texture.CurrentUnit;
- /*GLuint texTransformUnit = ctx->Texture.CurrentTransformUnit;*/
+
+ ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glGetPointerv");
+
+ if (!params)
+ return;
if (MESA_VERBOSE & VERBOSE_API)
fprintf(stderr, "glGetPointerv %s\n", gl_lookup_enum_by_nr(pname));
+ if (ctx->Driver.GetPointerv
+ && (*ctx->Driver.GetPointerv)(ctx, pname, params))
+ return;
+
switch (pname) {
case GL_VERTEX_ARRAY_POINTER:
*params = ctx->Array.Vertex.Ptr;
@@ -4673,7 +4707,7 @@ _mesa_GetString( GLenum name )
GET_CURRENT_CONTEXT(ctx);
static const char *vendor = "Brian Paul";
static const char *renderer = "Mesa";
- static const char *version = "1.2 Mesa 3.3";
+ static const char *version = "1.2 Mesa 3.5 beta";
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH_WITH_RETVAL(ctx, "glGetString", 0);