Mesa (mesa_7_2_branch): mesa: fix float->int mapping for glGetIntegerv( GL_DEPTH_CLEAR_VALUE)

Brian Paul brianp at kemper.freedesktop.org
Thu Sep 25 17:44:26 UTC 2008


Module: Mesa
Branch: mesa_7_2_branch
Commit: b06572e31926428089c89d7ab4669a882a2394d1
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=b06572e31926428089c89d7ab4669a882a2394d1

Author: Brian Paul <brian.paul at tungstengraphics.com>
Date:   Thu Sep 25 11:43:05 2008 -0600

mesa: fix float->int mapping for glGetIntegerv(GL_DEPTH_CLEAR_VALUE)

---

 src/mesa/main/get.c      |    2 +-
 src/mesa/main/get_gen.py |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c
index b36154a..a9232d3 100644
--- a/src/mesa/main/get.c
+++ b/src/mesa/main/get.c
@@ -3989,7 +3989,7 @@ _mesa_GetIntegerv( GLenum pname, GLint *params )
          params[0] = ctx->DrawBuffer->Visual.depthBits;
          break;
       case GL_DEPTH_CLEAR_VALUE:
-         params[0] = IROUND(ctx->Depth.Clear);
+         params[0] = FLOAT_TO_INT(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 1c0279c..1a464f5 100644
--- a/src/mesa/main/get_gen.py
+++ b/src/mesa/main/get_gen.py
@@ -179,7 +179,7 @@ StateVars = [
 	( "GL_DEPTH_BIAS", GLfloat, ["ctx->Pixel.DepthBias"], "", None ),
 	( "GL_DEPTH_BITS", GLint, ["ctx->DrawBuffer->Visual.depthBits"],
 	  "", None ),
-	( "GL_DEPTH_CLEAR_VALUE", GLfloat, ["ctx->Depth.Clear"], "", None ),
+	( "GL_DEPTH_CLEAR_VALUE", GLfloatN, ["ctx->Depth.Clear"], "", None ),
 	( "GL_DEPTH_FUNC", GLenum, ["ctx->Depth.Func"], "", None ),
 	( "GL_DEPTH_RANGE", GLfloatN,
 	  [ "ctx->Viewport.Near", "ctx->Viewport.Far" ], "", None ),




More information about the mesa-commit mailing list