aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main/polygon.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>1999-11-11 01:22:25 +0000
committerBrian Paul <[email protected]>1999-11-11 01:22:25 +0000
commitfbd8f212c3866ec98c1d8c9d3db3ddb7e7c479a5 (patch)
treefb9ea4452e1f65c6e3c11ee4c4f17c023f8262e5 /src/mesa/main/polygon.c
parent06ac59281bdad6679fb1941e31e3c4df1c12cede (diff)
first big check-in of new Mesa 3.3 code
Diffstat (limited to 'src/mesa/main/polygon.c')
-rw-r--r--src/mesa/main/polygon.c49
1 files changed, 30 insertions, 19 deletions
diff --git a/src/mesa/main/polygon.c b/src/mesa/main/polygon.c
index eebbaa886fa..f93ab195665 100644
--- a/src/mesa/main/polygon.c
+++ b/src/mesa/main/polygon.c
@@ -1,8 +1,8 @@
-/* $Id: polygon.c,v 1.6 1999/11/08 15:28:08 brianp Exp $ */
+/* $Id: polygon.c,v 1.7 1999/11/11 01:22:27 brianp Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 3.1
+ * Version: 3.3
*
* Copyright (C) 1999 Brian Paul All Rights Reserved.
*
@@ -25,31 +25,25 @@
*/
-/* $XFree86: xc/lib/GL/mesa/src/polygon.c,v 1.3 1999/04/04 00:20:29 dawes 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 +63,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 +87,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 +135,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 +154,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 +168,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 +181,10 @@ void gl_PolygonOffset( GLcontext *ctx,
ctx->Polygon.OffsetUnits = units;
}
+
+void
+_mesa_PolygonOffsetEXT( GLfloat factor, GLfloat bias )
+{
+ _mesa_PolygonOffset(factor, bias * DEPTH_SCALE );
+}
+