mesa: Add support for glDepthRangef and glClearDepthf.
authorEric Anholt <eric@anholt.net>
Fri, 14 Jan 2011 23:53:38 +0000 (15:53 -0800)
committerEric Anholt <eric@anholt.net>
Sat, 15 Jan 2011 00:55:35 +0000 (16:55 -0800)
These are ARB_ES2_compatibility float variants of the core double
entrypoints.  Fixes arb_es2_compatibility-depthrangef.

src/mesa/main/api_exec.c
src/mesa/main/depth.c
src/mesa/main/depth.h
src/mesa/main/viewport.c
src/mesa/main/viewport.h

index 1427abd..f1e4f73 100644 (file)
@@ -361,6 +361,10 @@ _mesa_create_exec_table(void)
    SET_PointParameterfvEXT(exec, _mesa_PointParameterfv);
 #endif
 
+   /* 95. GL_ARB_ES2_compatibility */
+   SET_ClearDepthf(exec, _mesa_ClearDepthf);
+   SET_DepthRangef(exec, _mesa_DepthRangef);
+
    /* 97. GL_EXT_compiled_vertex_array */
 #if _HAVE_FULL_GL
    SET_LockArraysEXT(exec, _mesa_LockArraysEXT);
index c5a910e..0bb4773 100644 (file)
@@ -56,6 +56,12 @@ _mesa_ClearDepth( GLclampd depth )
 }
 
 
+void GLAPIENTRY
+_mesa_ClearDepthf( GLclampf depth )
+{
+   _mesa_ClearDepth(depth);
+}
+
 
 void GLAPIENTRY
 _mesa_DepthFunc( GLenum func )
index b498a47..2f42862 100644 (file)
@@ -44,6 +44,9 @@ extern void GLAPIENTRY
 _mesa_ClearDepth( GLclampd depth );
 
 extern void GLAPIENTRY
+_mesa_ClearDepthf( GLclampf depth );
+
+extern void GLAPIENTRY
 _mesa_DepthFunc( GLenum func );
 
 extern void GLAPIENTRY
index d19ae3b..a58697a 100644 (file)
@@ -146,7 +146,11 @@ _mesa_DepthRange(GLclampd nearval, GLclampd farval)
    }
 }
 
-
+void GLAPIENTRY
+_mesa_DepthRangef(GLclampf nearval, GLclampf farval)
+{
+   _mesa_DepthRange(nearval, farval);
+}
 
 /** 
  * Initialize the context viewport attribute group.
index 909ff92..db4507b 100644 (file)
@@ -43,6 +43,9 @@ _mesa_set_viewport(struct gl_context *ctx, GLint x, GLint y,
 extern void GLAPIENTRY
 _mesa_DepthRange(GLclampd nearval, GLclampd farval);
 
+extern void GLAPIENTRY
+_mesa_DepthRangef(GLclampf nearval, GLclampf farval);
+
 
 extern void 
 _mesa_init_viewport(struct gl_context *ctx);