From 6fd15dd80666ccb1e9b99cedd306e32cc7cee989 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 19 Aug 2008 18:14:15 -0600 Subject: [PATCH] mesa: allow for extra per-context init (cherry picked from commit 815cdcfbc0740c66b901361620c88d99541bdad2) --- src/mesa/main/context.c | 4 ++++ src/mesa/main/context.h | 3 +++ src/mesa/main/points.c | 4 ---- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index d6205fc4536..a41cb42952e 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -1234,6 +1234,10 @@ _mesa_initialize_context(GLcontext *ctx, ctx->FragmentProgram._MaintainTexEnvProgram = GL_TRUE; } +#ifdef FEATURE_extra_context_init + _mesa_initialize_context_extra(ctx); +#endif + ctx->FirstTimeCurrent = GL_TRUE; return GL_TRUE; diff --git a/src/mesa/main/context.h b/src/mesa/main/context.h index bb6f3acf062..54f1af911d3 100644 --- a/src/mesa/main/context.h +++ b/src/mesa/main/context.h @@ -114,6 +114,9 @@ _mesa_initialize_context( GLcontext *ctx, const struct dd_function_table *driverFunctions, void *driverContext ); +extern void +_mesa_initialize_context_extra(GLcontext *ctx); + extern void _mesa_free_context_data( GLcontext *ctx ); diff --git a/src/mesa/main/points.c b/src/mesa/main/points.c index e450b151398..7e189a0a8c9 100644 --- a/src/mesa/main/points.c +++ b/src/mesa/main/points.c @@ -254,11 +254,7 @@ _mesa_init_point(GLcontext *ctx) ctx->Point.MaxSize = MAX2(ctx->Const.MaxPointSize, ctx->Const.MaxPointSizeAA); ctx->Point.Threshold = 1.0; -#if FEATURE_es2_glsl - ctx->Point.PointSprite = GL_TRUE; /* GL_ARB/NV_point_sprite */ -#else ctx->Point.PointSprite = GL_FALSE; /* GL_ARB/NV_point_sprite */ -#endif ctx->Point.SpriteRMode = GL_ZERO; /* GL_NV_point_sprite (only!) */ ctx->Point.SpriteOrigin = GL_UPPER_LEFT; /* GL_ARB_point_sprite */ for (i = 0; i < MAX_TEXTURE_UNITS; i++) { -- 2.30.2