summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2009-01-06 14:21:27 -0700
committerBrian Paul <brianp@vmware.com>2009-01-06 14:21:27 -0700
commitd14d494dcda3d80ec2cf452551c680ffb432e306 (patch)
tree8bf4c1b2fed72612aec82b76246604a26f90c1ed
parentc3be5e4a050561e25854f38aa221bbf657848762 (diff)
mesa: fix GL_DEPTH_CLEAR_VALUE casting
-rw-r--r--src/mesa/main/get.c6
-rw-r--r--src/mesa/main/get_gen.py2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c
index 80dcea9bca..55b62bc537 100644
--- a/src/mesa/main/get.c
+++ b/src/mesa/main/get.c
@@ -289,7 +289,7 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params )
params[0] = INT_TO_BOOLEAN(ctx->DrawBuffer->Visual.depthBits);
break;
case GL_DEPTH_CLEAR_VALUE:
- params[0] = FLOAT_TO_BOOLEAN(ctx->Depth.Clear);
+ params[0] = FLOAT_TO_BOOLEAN(((GLfloat) ctx->Depth.Clear));
break;
case GL_DEPTH_FUNC:
params[0] = ENUM_TO_BOOLEAN(ctx->Depth.Func);
@@ -2133,7 +2133,7 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params )
params[0] = (GLfloat)(ctx->DrawBuffer->Visual.depthBits);
break;
case GL_DEPTH_CLEAR_VALUE:
- params[0] = ctx->Depth.Clear;
+ params[0] = ((GLfloat) ctx->Depth.Clear);
break;
case GL_DEPTH_FUNC:
params[0] = ENUM_TO_FLOAT(ctx->Depth.Func);
@@ -3977,7 +3977,7 @@ _mesa_GetIntegerv( GLenum pname, GLint *params )
params[0] = ctx->DrawBuffer->Visual.depthBits;
break;
case GL_DEPTH_CLEAR_VALUE:
- params[0] = FLOAT_TO_INT(ctx->Depth.Clear);
+ params[0] = FLOAT_TO_INT(((GLfloat) ctx->Depth.Clear));
break;
case GL_DEPTH_FUNC:
params[0] = ENUM_TO_INT(ctx->Depth.Func);
diff --git a/src/mesa/main/get_gen.py b/src/mesa/main/get_gen.py
index f99e0a080d..cbac908057 100644
--- a/src/mesa/main/get_gen.py
+++ b/src/mesa/main/get_gen.py
@@ -180,7 +180,7 @@ StateVars = [
( "GL_DEPTH_BIAS", GLfloat, ["ctx->Pixel.DepthBias"], "", None ),
( "GL_DEPTH_BITS", GLint, ["ctx->DrawBuffer->Visual.depthBits"],
"", None ),
- ( "GL_DEPTH_CLEAR_VALUE", GLfloatN, ["ctx->Depth.Clear"], "", None ),
+ ( "GL_DEPTH_CLEAR_VALUE", GLfloatN, ["((GLfloat) ctx->Depth.Clear)"], "", None ),
( "GL_DEPTH_FUNC", GLenum, ["ctx->Depth.Func"], "", None ),
( "GL_DEPTH_RANGE", GLfloatN,
[ "ctx->Viewport.Near", "ctx->Viewport.Far" ], "", None ),