-/* $Id: get.c,v 1.65 2001/06/26 01:32:48 brianp Exp $ */
+/* $Id: get.c,v 1.66 2001/08/20 16:42:40 brianp Exp $ */
/*
* Mesa 3-D graphics library
}
+#define GET_FLOAT_ERROR \
+{ \
+ char s[100]; \
+ sprintf(s, "glGetFloatv(0x%x)", pname); \
+ _mesa_error(ctx, GL_INVALID_ENUM, s); \
+}
+
void
_mesa_GetFloatv( GLenum pname, GLfloat *params )
{
*params = (GLfloat) ctx->Pixel.HistogramEnabled;
}
else {
- _mesa_error(ctx, GL_INVALID_ENUM, "glGetFloatv");
+ GET_FLOAT_ERROR;
return;
}
break;
if (ctx->Extensions.ARB_texture_cube_map)
*params = (GLfloat) _mesa_IsEnabled(GL_TEXTURE_CUBE_MAP_ARB);
else
- _mesa_error(ctx, GL_INVALID_ENUM, "glGetFloatv");
+ GET_FLOAT_ERROR;
return;
case GL_TEXTURE_BINDING_CUBE_MAP_ARB:
if (ctx->Extensions.ARB_texture_cube_map)
*params = (GLfloat) textureUnit->CurrentCubeMap->Name;
else
- _mesa_error(ctx, GL_INVALID_ENUM, "glGetFloatv");
+ GET_FLOAT_ERROR;
return;
case GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB:
if (ctx->Extensions.ARB_texture_cube_map)
*params = (GLfloat) (1 << (ctx->Const.MaxCubeTextureLevels - 1));
else
- _mesa_error(ctx, GL_INVALID_ENUM, "glGetFloatv");
+ GET_FLOAT_ERROR;
return;
/* GL_ARB_texture_compression */
*params = (GLfloat) ctx->Hint.TextureCompression;
}
else
- _mesa_error(ctx, GL_INVALID_ENUM, "glGetFloatv");
+ GET_FLOAT_ERROR;
break;
case GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB:
if (ctx->Extensions.ARB_texture_compression) {
*params = (GLfloat) ctx->Const.NumCompressedTextureFormats;
}
else
- _mesa_error(ctx, GL_INVALID_ENUM, "glGetFloatv");
+ GET_FLOAT_ERROR;
break;
case GL_COMPRESSED_TEXTURE_FORMATS_ARB:
if (ctx->Extensions.ARB_texture_compression) {
params[i] = (GLfloat) ctx->Const.CompressedTextureFormats[i];
}
else
- _mesa_error(ctx, GL_INVALID_ENUM, "glGetFloatv");
+ GET_FLOAT_ERROR;
break;
/* GL_EXT_compiled_vertex_array */
*params = (GLfloat) ctx->Depth.OcclusionTest;
}
else {
- _mesa_error( ctx, GL_INVALID_ENUM, "glGetFloatv" );
+ GET_FLOAT_ERROR;
}
return;
case GL_OCCLUSION_TEST_RESULT_HP:
ctx->OcclusionResultSaved = GL_FALSE;
}
else {
- _mesa_error( ctx, GL_INVALID_ENUM, "glGetFloatv" );
+ GET_FLOAT_ERROR;
}
return;
*params = (GLfloat) ctx->Pixel.Convolution1DEnabled;
}
else {
- _mesa_error(ctx, GL_INVALID_ENUM, "glGetFloatv");
+ GET_FLOAT_ERROR;
return;
}
break;
*params = (GLfloat) ctx->Pixel.Convolution2DEnabled;
}
else {
- _mesa_error(ctx, GL_INVALID_ENUM, "glGetFloatv");
+ GET_FLOAT_ERROR;
return;
}
break;
*params = (GLfloat) ctx->Pixel.Separable2DEnabled;
}
else {
- _mesa_error(ctx, GL_INVALID_ENUM, "glGetFloatv");
+ GET_FLOAT_ERROR;
return;
}
break;
*params = ctx->Const.MaxTextureMaxAnisotropy;
}
else {
- _mesa_error( ctx, GL_INVALID_ENUM, "glGetFloatv" );
+ GET_FLOAT_ERROR;
return;
}
break;
*params = (GLfloat) ctx->Multisample.Enabled;
}
else {
- _mesa_error(ctx, GL_INVALID_ENUM, "glGetFloatv");
+ GET_FLOAT_ERROR;
return;
}
case GL_SAMPLE_ALPHA_TO_COVERAGE_ARB:
*params = (GLfloat) ctx->Multisample.SampleAlphaToCoverage;
}
else {
- _mesa_error(ctx, GL_INVALID_ENUM, "glGetFloatv");
+ GET_FLOAT_ERROR;
return;
}
case GL_SAMPLE_ALPHA_TO_ONE_ARB:
*params = (GLfloat) ctx->Multisample.SampleAlphaToOne;
}
else {
- _mesa_error(ctx, GL_INVALID_ENUM, "glGetFloatv");
+ GET_FLOAT_ERROR;
return;
}
case GL_SAMPLE_COVERAGE_ARB:
*params = (GLfloat) ctx->Multisample.SampleCoverage;
}
else {
- _mesa_error(ctx, GL_INVALID_ENUM, "glGetFloatv");
+ GET_FLOAT_ERROR;
return;
}
case GL_SAMPLE_COVERAGE_VALUE_ARB:
*params = ctx->Multisample.SampleCoverageValue;
}
else {
- _mesa_error(ctx, GL_INVALID_ENUM, "glGetFloatv");
+ GET_FLOAT_ERROR;
return;
}
case GL_SAMPLE_COVERAGE_INVERT_ARB:
*params = (GLfloat) ctx->Multisample.SampleCoverageInvert;
}
else {
- _mesa_error(ctx, GL_INVALID_ENUM, "glGetFloatv");
+ GET_FLOAT_ERROR;
return;
}
case GL_SAMPLE_BUFFERS_ARB:
*params = 0.0; /* XXX fix someday */
}
else {
- _mesa_error(ctx, GL_INVALID_ENUM, "glGetFloatv");
+ GET_FLOAT_ERROR;
return;
}
case GL_SAMPLES_ARB:
*params = 0.0; /* XXX fix someday */
}
else {
- _mesa_error(ctx, GL_INVALID_ENUM, "glGetFloatv");
+ GET_FLOAT_ERROR;
return;
}
*params = (GLfloat) ctx->Transform.RasterPositionUnclipped;
}
else {
- _mesa_error(ctx, GL_INVALID_ENUM, "glGetFloatn");
+ GET_FLOAT_ERROR;
return;
}
*params = (GLfloat) ctx->Point.SpriteMode;
}
else {
- _mesa_error( ctx, GL_INVALID_ENUM, "glGetFloatv" );
+ GET_FLOAT_ERROR;
return;
}
break;
*params = (GLfloat) ctx->Hint.GenerateMipmap;
}
else {
- _mesa_error(ctx, GL_INVALID_ENUM, "glGetFloatv");
+ GET_FLOAT_ERROR;
return;
}
break;
default:
- _mesa_error( ctx, GL_INVALID_ENUM, "glGetFloatv" );
+ GET_FLOAT_ERROR;
}
}
GET_CURRENT_CONTEXT(ctx);
static const char *vendor = "Brian Paul";
static const char *renderer = "Mesa";
- static const char *version = "1.2 Mesa 3.5";
+ static const char *version = "1.2 Mesa 3.5.1";
+
ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, 0);
/* this is a required driver function */