diff options
author | Brian Paul <[email protected]> | 2000-08-30 18:21:06 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2000-08-30 18:21:06 +0000 |
commit | 8e053916c8052b47c191f68991c126f47c72c3f3 (patch) | |
tree | 56ce72c5a4958145c18030cabe7d10c9f1cb8b98 /src/mesa/main/get.c | |
parent | 289d47eee5342bd7ec1c25a29d9bdc8d6f9dc4ed (diff) |
added more extensions testing code
Diffstat (limited to 'src/mesa/main/get.c')
-rw-r--r-- | src/mesa/main/get.c | 34 |
1 files changed, 29 insertions, 5 deletions
diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c index 29124d88b1c..542d8061b2c 100644 --- a/src/mesa/main/get.c +++ b/src/mesa/main/get.c @@ -1,4 +1,4 @@ -/* $Id: get.c,v 1.31 2000/08/08 16:15:14 brianp Exp $ */ +/* $Id: get.c,v 1.32 2000/08/30 18:21:06 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -355,7 +355,13 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params ) *params = FLOAT_TO_BOOL(ctx->Pixel.GreenScale); break; case GL_HISTOGRAM: - *params = ctx->Pixel.HistogramEnabled; + if (ctx->Extensions.HaveHistogram) { + *params = ctx->Pixel.HistogramEnabled; + } + else { + gl_error(ctx, GL_INVALID_ENUM, "glGetBooleanv"); + return; + } break; case GL_INDEX_BITS: *params = INT_TO_BOOL( ctx->Visual->IndexBits ); @@ -1504,7 +1510,13 @@ _mesa_GetDoublev( GLenum pname, GLdouble *params ) *params = (GLdouble) ctx->Pixel.GreenScale; break; case GL_HISTOGRAM: - *params = (GLdouble) ctx->Pixel.HistogramEnabled; + if (ctx->Extensions.HaveHistogram) { + *params = (GLdouble) ctx->Pixel.HistogramEnabled; + } + else { + gl_error(ctx, GL_INVALID_ENUM, "glGetDoublev"); + return; + } break; case GL_INDEX_BITS: *params = (GLdouble) ctx->Visual->IndexBits; @@ -2650,7 +2662,13 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params ) *params = (GLfloat) ctx->Pixel.GreenScale; break; case GL_HISTOGRAM: - *params = (GLfloat) ctx->Pixel.HistogramEnabled; + if (ctx->Extensions.HaveHistogram) { + *params = (GLfloat) ctx->Pixel.HistogramEnabled; + } + else { + gl_error(ctx, GL_INVALID_ENUM, "glGetFloatv"); + return; + } break; case GL_INDEX_BITS: *params = (GLfloat) ctx->Visual->IndexBits; @@ -3775,7 +3793,13 @@ _mesa_GetIntegerv( GLenum pname, GLint *params ) *params = (GLint) ctx->Pixel.GreenScale; break; case GL_HISTOGRAM: - *params = (GLint) ctx->Pixel.HistogramEnabled; + if (ctx->Extensions.HaveHistogram) { + *params = (GLint) ctx->Pixel.HistogramEnabled; + } + else { + gl_error(ctx, GL_INVALID_ENUM, "glGetFloatv"); + return; + } break; case GL_INDEX_BITS: *params = (GLint) ctx->Visual->IndexBits; |