From fbd8f212c3866ec98c1d8c9d3db3ddb7e7c479a5 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 11 Nov 1999 01:22:25 +0000 Subject: first big check-in of new Mesa 3.3 code --- src/mesa/main/enable.c | 50 +++++++++++++++++++++++++++----------------------- 1 file changed, 27 insertions(+), 23 deletions(-) (limited to 'src/mesa/main/enable.c') diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c index c12013a421..8a1b79f610 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 -#include -#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 ); } -- cgit v1.2.3