diff options
Diffstat (limited to 'xc/extras/Mesa/src/polygon.c')
-rw-r--r-- | xc/extras/Mesa/src/polygon.c | 48 |
1 files changed, 29 insertions, 19 deletions
diff --git a/xc/extras/Mesa/src/polygon.c b/xc/extras/Mesa/src/polygon.c index a3392b0e1..50ce47b90 100644 --- a/xc/extras/Mesa/src/polygon.c +++ b/xc/extras/Mesa/src/polygon.c @@ -1,8 +1,7 @@ -/* $Id: polygon.c,v 1.1.1.1 2000/01/06 13:27:00 faith Exp $ */ /* * Mesa 3-D graphics library - * Version: 3.1 + * Version: 3.3 * * Copyright (C) 1999 Brian Paul All Rights Reserved. * @@ -25,31 +24,25 @@ */ -/* $XFree86: xc/extras/Mesa/src/polygon.c,v 1.1 1999/12/14 01:31:46 robin Exp $ */ - #ifdef PC_HEADER #include "all.h" #else -#ifndef XFree86Server -#include <assert.h> -#include <stdlib.h> -#include <stdio.h> -#include <string.h> -#else -#include "GL/xf86glx.h" -#endif +#include "glheader.h" #include "context.h" #include "image.h" #include "enums.h" #include "macros.h" +#include "mem.h" #include "polygon.h" #include "types.h" #endif -void gl_CullFace( GLcontext *ctx, GLenum mode ) +void +_mesa_CullFace( GLenum mode ) { + GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glCullFace"); if (MESA_VERBOSE&VERBOSE_API) @@ -69,8 +62,10 @@ void gl_CullFace( GLcontext *ctx, GLenum mode ) -void gl_FrontFace( GLcontext *ctx, GLenum mode ) +void +_mesa_FrontFace( GLenum mode ) { + GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glFrontFace"); if (MESA_VERBOSE&VERBOSE_API) @@ -91,8 +86,10 @@ void gl_FrontFace( GLcontext *ctx, GLenum mode ) -void gl_PolygonMode( GLcontext *ctx, GLenum face, GLenum mode ) +void +_mesa_PolygonMode( GLenum face, GLenum mode ) { + GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glPolygonMode"); if (MESA_VERBOSE&VERBOSE_API) @@ -137,8 +134,11 @@ void gl_PolygonMode( GLcontext *ctx, GLenum face, GLenum mode ) /* * NOTE: stipple pattern has already been unpacked. */ -void gl_PolygonStipple( GLcontext *ctx, const GLuint pattern[32] ) +void +_mesa_PolygonStipple( const GLubyte *mask ) { + GET_CURRENT_CONTEXT(ctx); + GLuint *pattern = (GLuint *) mask; /* XXX verify */ ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glPolygonStipple"); if (MESA_VERBOSE&VERBOSE_API) @@ -153,8 +153,10 @@ void gl_PolygonStipple( GLcontext *ctx, const GLuint pattern[32] ) -void gl_GetPolygonStipple( GLcontext *ctx, GLubyte *dest ) +void +_mesa_GetPolygonStipple( GLubyte *dest ) { + GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glPolygonOffset"); if (MESA_VERBOSE&VERBOSE_API) @@ -165,9 +167,10 @@ void gl_GetPolygonStipple( GLcontext *ctx, GLubyte *dest ) -void gl_PolygonOffset( GLcontext *ctx, - GLfloat factor, GLfloat units ) +void +_mesa_PolygonOffset( GLfloat factor, GLfloat units ) { + GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glPolygonOffset"); if (MESA_VERBOSE&VERBOSE_API) @@ -177,3 +180,10 @@ void gl_PolygonOffset( GLcontext *ctx, ctx->Polygon.OffsetUnits = units; } + +void +_mesa_PolygonOffsetEXT( GLfloat factor, GLfloat bias ) +{ + _mesa_PolygonOffset(factor, bias * DEPTH_SCALE ); +} + |