Merge vtx-0-2-branch
[mesa.git] / src / mesa / main / depth.c
index 1e07607c46380e9161d35cbd0b891da22f66b721..eb8c8b821b256f4f26aa696cc81090237087b33f 100644 (file)
 
 
 
-void
+void GLAPIENTRY
 _mesa_ClearDepth( GLclampd depth )
 {
    GET_CURRENT_CONTEXT(ctx);
-   GLfloat tmp = (GLfloat) CLAMP( depth, 0.0, 1.0 );
    ASSERT_OUTSIDE_BEGIN_END(ctx);
 
-   if (ctx->Depth.Clear == tmp)
+   depth = CLAMP( depth, 0.0, 1.0 );
+
+   if (ctx->Depth.Clear == depth)
       return;
 
    FLUSH_VERTICES(ctx, _NEW_DEPTH);
-   ctx->Depth.Clear = tmp;
+   ctx->Depth.Clear = depth;
    if (ctx->Driver.ClearDepth)
       (*ctx->Driver.ClearDepth)( ctx, ctx->Depth.Clear );
 }
 
 
 
-void
+void GLAPIENTRY
 _mesa_DepthFunc( GLenum func )
 {
    GET_CURRENT_CONTEXT(ctx);
@@ -93,7 +94,7 @@ _mesa_DepthFunc( GLenum func )
 
 
 
-void
+void GLAPIENTRY
 _mesa_DepthMask( GLboolean flag )
 {
    GET_CURRENT_CONTEXT(ctx);
@@ -119,7 +120,7 @@ _mesa_DepthMask( GLboolean flag )
 
 
 /* GL_EXT_depth_bounds_test */
-void
+void GLAPIENTRY
 _mesa_DepthBoundsEXT( GLclampd zmin, GLclampd zmax )
 {
    GET_CURRENT_CONTEXT(ctx);