mesa: Change "BRIAN PAUL" to "THE AUTHORS" in license text.
[mesa.git] / src / mesa / main / viewport.c
index 309308c983b34067fb0240912570a8ce06cf0a1f..4962c74f2dc7a2e515465801f33b08f3ad42222d 100644 (file)
@@ -17,7 +17,7 @@
  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
  * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
@@ -31,6 +31,7 @@
 
 #include "context.h"
 #include "macros.h"
+#include "mtypes.h"
 #include "viewport.h"
 
 
@@ -45,7 +46,7 @@ void GLAPIENTRY
 _mesa_Viewport(GLint x, GLint y, GLsizei width, GLsizei height)
 {
    GET_CURRENT_CONTEXT(ctx);
-   ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+   FLUSH_VERTICES(ctx, 0);
    _mesa_set_viewport(ctx, x, y, width, height);
 }
 
@@ -60,7 +61,7 @@ _mesa_Viewport(GLint x, GLint y, GLsizei width, GLsizei height)
  * \param height height of the viewport rectangle.
  */
 void
-_mesa_set_viewport(GLcontext *ctx, GLint x, GLint y,
+_mesa_set_viewport(struct gl_context *ctx, GLint x, GLint y,
                     GLsizei width, GLsizei height)
 {
    if (MESA_VERBOSE & VERBOSE_API)
@@ -115,7 +116,8 @@ void GLAPIENTRY
 _mesa_DepthRange(GLclampd nearval, GLclampd farval)
 {
    GET_CURRENT_CONTEXT(ctx);
-   ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+
+   FLUSH_VERTICES(ctx, 0);
 
    if (MESA_VERBOSE&VERBOSE_API)
       _mesa_debug(ctx, "glDepthRange %f %f\n", nearval, farval);
@@ -145,13 +147,17 @@ _mesa_DepthRange(GLclampd nearval, GLclampd farval)
    }
 }
 
-
+void GLAPIENTRY
+_mesa_DepthRangef(GLclampf nearval, GLclampf farval)
+{
+   _mesa_DepthRange(nearval, farval);
+}
 
 /** 
  * Initialize the context viewport attribute group.
  * \param ctx  the GL context.
  */
-void _mesa_init_viewport(GLcontext *ctx)
+void _mesa_init_viewport(struct gl_context *ctx)
 {
    GLfloat depthMax = 65535.0F; /* sorf of arbitrary */
 
@@ -173,7 +179,7 @@ void _mesa_init_viewport(GLcontext *ctx)
  * Free the context viewport attribute group data.
  * \param ctx  the GL context.
  */
-void _mesa_free_viewport_data(GLcontext *ctx)
+void _mesa_free_viewport_data(struct gl_context *ctx)
 {
    _math_matrix_dtr(&ctx->Viewport._WindowMap);
 }