From f9995b30756140724f41daf963fa06167912be7f Mon Sep 17 00:00:00 2001 From: Kristian Høgsberg Date: Tue, 12 Oct 2010 12:26:10 -0400 Subject: Drop GLcontext typedef and use struct gl_context instead --- src/mesa/main/state.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'src/mesa/main/state.c') diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c index 4a3dffe4cf..5529732de0 100644 --- a/src/mesa/main/state.c +++ b/src/mesa/main/state.c @@ -27,7 +27,7 @@ * \file state.c * State management. * - * This file manages recalculation of derived values in GLcontext. + * This file manages recalculation of derived values in struct gl_context. */ @@ -51,7 +51,7 @@ static void -update_separate_specular(GLcontext *ctx) +update_separate_specular(struct gl_context *ctx) { if (NEED_SECONDARY_COLOR(ctx)) ctx->_TriangleCaps |= DD_SEPARATE_SPECULAR; @@ -107,7 +107,7 @@ update_min(GLuint min, struct gl_client_array *array) * Need to do this upon new array state or new buffer object state. */ static void -update_arrays( GLcontext *ctx ) +update_arrays( struct gl_context *ctx ) { struct gl_array_object *arrayObj = ctx->Array.ArrayObj; GLuint i, min = ~0; @@ -219,7 +219,7 @@ update_arrays( GLcontext *ctx ) * This needs to be done before texture state validation. */ static void -update_program_enables(GLcontext *ctx) +update_program_enables(struct gl_context *ctx) { /* These _Enabled flags indicate if the program is enabled AND valid. */ ctx->VertexProgram._Enabled = ctx->VertexProgram.Enabled @@ -245,7 +245,7 @@ update_program_enables(GLcontext *ctx) * or fragment program is being used. */ static GLbitfield -update_program(GLcontext *ctx) +update_program(struct gl_context *ctx) { const struct gl_shader_program *shProg = ctx->Shader.CurrentProgram; const struct gl_vertex_program *prevVP = ctx->VertexProgram._Current; @@ -362,7 +362,7 @@ update_program(GLcontext *ctx) * Examine shader constants and return either _NEW_PROGRAM_CONSTANTS or 0. */ static GLbitfield -update_program_constants(GLcontext *ctx) +update_program_constants(struct gl_context *ctx) { GLbitfield new_state = 0x0; @@ -399,7 +399,7 @@ update_program_constants(GLcontext *ctx) static void -update_viewport_matrix(GLcontext *ctx) +update_viewport_matrix(struct gl_context *ctx) { const GLfloat depthMax = ctx->DrawBuffer->_DepthMaxF; @@ -421,7 +421,7 @@ update_viewport_matrix(GLcontext *ctx) * Update derived multisample state. */ static void -update_multisample(GLcontext *ctx) +update_multisample(struct gl_context *ctx) { ctx->Multisample._Enabled = GL_FALSE; if (ctx->Multisample.Enabled && @@ -435,7 +435,7 @@ update_multisample(GLcontext *ctx) * Update derived color/blend/logicop state. */ static void -update_color(GLcontext *ctx) +update_color(struct gl_context *ctx) { /* This is needed to support 1.1's RGB logic ops AND * 1.0's blending logicops. @@ -449,7 +449,7 @@ update_color(GLcontext *ctx) * in ctx->_TriangleCaps if needed. */ static void -update_polygon(GLcontext *ctx) +update_polygon(struct gl_context *ctx) { ctx->_TriangleCaps &= ~(DD_TRI_CULL_FRONT_BACK | DD_TRI_OFFSET); @@ -471,7 +471,7 @@ update_polygon(GLcontext *ctx) */ #if 0 static void -update_tricaps(GLcontext *ctx, GLbitfield new_state) +update_tricaps(struct gl_context *ctx, GLbitfield new_state) { ctx->_TriangleCaps = 0; @@ -540,7 +540,7 @@ update_tricaps(GLcontext *ctx, GLbitfield new_state) /** * Compute derived GL state. - * If __GLcontextRec::NewState is non-zero then this function \b must + * If __struct gl_contextRec::NewState is non-zero then this function \b must * be called before rendering anything. * * Calls dd_function_table::UpdateState to perform any internal state @@ -551,7 +551,7 @@ update_tricaps(GLcontext *ctx, GLbitfield new_state) * _mesa_update_lighting() and _mesa_update_tnl_spaces(). */ void -_mesa_update_state_locked( GLcontext *ctx ) +_mesa_update_state_locked( struct gl_context *ctx ) { GLbitfield new_state = ctx->NewState; GLbitfield prog_flags = _NEW_PROGRAM; @@ -670,7 +670,7 @@ _mesa_update_state_locked( GLcontext *ctx ) /* This is the usual entrypoint for state updates: */ void -_mesa_update_state( GLcontext *ctx ) +_mesa_update_state( struct gl_context *ctx ) { _mesa_lock_context_textures(ctx); _mesa_update_state_locked(ctx); @@ -703,7 +703,7 @@ _mesa_update_state( GLcontext *ctx ) * Otherwise, the fp should track them as state values instead. */ void -_mesa_set_varying_vp_inputs( GLcontext *ctx, +_mesa_set_varying_vp_inputs( struct gl_context *ctx, GLbitfield varying_inputs ) { if (ctx->varying_vp_inputs != varying_inputs) { @@ -721,7 +721,7 @@ _mesa_set_varying_vp_inputs( GLcontext *ctx, * of ordinary varyings/inputs. */ void -_mesa_set_vp_override(GLcontext *ctx, GLboolean flag) +_mesa_set_vp_override(struct gl_context *ctx, GLboolean flag) { if (ctx->VertexProgram._Overriden != flag) { ctx->VertexProgram._Overriden = flag; -- cgit v1.2.3