X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2Fmain%2Fscissor.c;h=df665994a95395ca70a5d00ccc46be93186e0257;hb=e9ff76aa81d9bd973d46b7e46f1e4ece2112a5b7;hp=b5f4cde7898734be5874f273cd5fcda683bf2dda;hpb=aa3ab377e6e2e5811cdd704d87c3e24acb5eff72;p=mesa.git diff --git a/src/mesa/main/scissor.c b/src/mesa/main/scissor.c index b5f4cde7898..df665994a95 100644 --- a/src/mesa/main/scissor.c +++ b/src/mesa/main/scissor.c @@ -25,6 +25,7 @@ #include "main/glheader.h" #include "main/context.h" +#include "main/mtypes.h" #include "main/scissor.h" @@ -37,14 +38,14 @@ _mesa_Scissor( GLint x, GLint y, GLsizei width, GLsizei height ) GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END(ctx); + if (MESA_VERBOSE & VERBOSE_API) + _mesa_debug(ctx, "glScissor %d %d %d %d\n", x, y, width, height); + if (width < 0 || height < 0) { _mesa_error( ctx, GL_INVALID_VALUE, "glScissor" ); return; } - if (MESA_VERBOSE & VERBOSE_API) - _mesa_debug(ctx, "glScissor %d %d %d %d\n", x, y, width, height); - _mesa_set_scissor(ctx, x, y, width, height); } @@ -58,12 +59,12 @@ _mesa_Scissor( GLint x, GLint y, GLsizei width, GLsizei height ) * * \sa glScissor(). * - * Verifies the parameters and updates __GLcontextRec::Scissor. On a + * Verifies the parameters and updates __struct gl_contextRec::Scissor. On a * change flushes the vertices and notifies the driver via * the dd_function_table::Scissor callback. */ void -_mesa_set_scissor(GLcontext *ctx, +_mesa_set_scissor(struct gl_context *ctx, GLint x, GLint y, GLsizei width, GLsizei height) { if (x == ctx->Scissor.X && @@ -88,7 +89,7 @@ _mesa_set_scissor(GLcontext *ctx, * \param ctx the GL context. */ void -_mesa_init_scissor(GLcontext *ctx) +_mesa_init_scissor(struct gl_context *ctx) { /* Scissor group */ ctx->Scissor.Enabled = GL_FALSE;