summaryrefslogtreecommitdiff
path: root/xc/extras/Mesa/src/enable.c
diff options
context:
space:
mode:
Diffstat (limited to 'xc/extras/Mesa/src/enable.c')
-rw-r--r--xc/extras/Mesa/src/enable.c50
1 files changed, 27 insertions, 23 deletions
diff --git a/xc/extras/Mesa/src/enable.c b/xc/extras/Mesa/src/enable.c
index 84065cb5c..e8067b15b 100644
--- a/xc/extras/Mesa/src/enable.c
+++ b/xc/extras/Mesa/src/enable.c
@@ -1,8 +1,8 @@
-/* $Id: enable.c,v 1.3 1999/12/14 02:39:38 daryll Exp $ */
+/* $Id: enable.c,v 1.4 2000/01/30 00:27:01 brianp Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 3.1
+ * Version: 3.3
*
* Copyright (C) 1999 Brian Paul All Rights Reserved.
*
@@ -25,17 +25,10 @@
*/
-/* $XFree86: xc/lib/GL/mesa/src/enable.c,v 1.3 1999/04/04 00:20:23 dawes Exp $ */
-
#ifdef PC_HEADER
#include "all.h"
#else
-#ifndef XFree86Server
-#include <stdio.h>
-#include <string.h>
-#else
-#include "GL/xf86glx.h"
-#endif
+#include "glheader.h"
#include "context.h"
#include "enable.h"
#include "light.h"
@@ -54,7 +47,7 @@
/*
* Perform glEnable and glDisable calls.
*/
-void gl_set_enable( GLcontext *ctx, GLenum cap, GLboolean state )
+void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state )
{
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH( ctx, "gl_enable/disable" );
@@ -123,8 +116,8 @@ void gl_set_enable( GLcontext *ctx, GLenum cap, GLboolean state )
if (ctx->Light.ColorMaterialEnabled!=state) {
ctx->Light.ColorMaterialEnabled = state;
ctx->NewState |= NEW_LIGHTING;
- if (state)
- gl_update_color_material( ctx, ctx->Current.ByteColor );
+ if (state)
+ gl_update_color_material( ctx, ctx->Current.ByteColor );
}
break;
case GL_CULL_FACE:
@@ -478,22 +471,28 @@ void gl_set_enable( GLcontext *ctx, GLenum cap, GLboolean state )
-void gl_Enable( GLcontext* ctx, GLenum cap )
+void
+_mesa_Enable( GLenum cap )
{
- gl_set_enable( ctx, cap, GL_TRUE );
+ GET_CURRENT_CONTEXT(ctx);
+ _mesa_set_enable( ctx, cap, GL_TRUE );
}
-void gl_Disable( GLcontext* ctx, GLenum cap )
+void
+_mesa_Disable( GLenum cap )
{
- gl_set_enable( ctx, cap, GL_FALSE );
+ GET_CURRENT_CONTEXT(ctx);
+ _mesa_set_enable( ctx, cap, GL_FALSE );
}
-GLboolean gl_IsEnabled( GLcontext* ctx, GLenum cap )
+GLboolean
+_mesa_IsEnabled( GLenum cap )
{
+ GET_CURRENT_CONTEXT(ctx);
switch (cap) {
case GL_ALPHA_TEST:
return ctx->Color.AlphaEnabled;
@@ -656,7 +655,8 @@ GLboolean gl_IsEnabled( GLcontext* ctx, GLenum cap )
-static void gl_client_state( GLcontext *ctx, GLenum cap, GLboolean state )
+static void
+client_state( GLcontext *ctx, GLenum cap, GLboolean state )
{
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH( ctx,
(state
@@ -691,15 +691,19 @@ static void gl_client_state( GLcontext *ctx, GLenum cap, GLboolean state )
-void gl_EnableClientState( GLcontext *ctx, GLenum cap )
+void
+_mesa_EnableClientState( GLenum cap )
{
- gl_client_state( ctx, cap, GL_TRUE );
+ GET_CURRENT_CONTEXT(ctx);
+ client_state( ctx, cap, GL_TRUE );
}
-void gl_DisableClientState( GLcontext *ctx, GLenum cap )
+void
+_mesa_DisableClientState( GLenum cap )
{
- gl_client_state( ctx, cap, GL_FALSE );
+ GET_CURRENT_CONTEXT(ctx);
+ client_state( ctx, cap, GL_FALSE );
}