summaryrefslogtreecommitdiff
path: root/src/mesa/main/enable.c
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>1999-11-11 01:22:25 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>1999-11-11 01:22:25 +0000
commitfbd8f212c3866ec98c1d8c9d3db3ddb7e7c479a5 (patch)
treefb9ea4452e1f65c6e3c11ee4c4f17c023f8262e5 /src/mesa/main/enable.c
parent06ac59281bdad6679fb1941e31e3c4df1c12cede (diff)
first big check-in of new Mesa 3.3 code
Diffstat (limited to 'src/mesa/main/enable.c')
-rw-r--r--src/mesa/main/enable.c50
1 files changed, 27 insertions, 23 deletions
diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c
index c12013a421a..8a1b79f610f 100644
--- a/src/mesa/main/enable.c
+++ b/src/mesa/main/enable.c
@@ -1,8 +1,8 @@
-/* $Id: enable.c,v 1.9 1999/11/10 06:29:44 keithw Exp $ */
+/* $Id: enable.c,v 1.10 1999/11/11 01:22:26 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 );
}