mesa: allow for extra per-context init
authorBrian Paul <brian.paul@tungstengraphics.com>
Wed, 20 Aug 2008 00:14:15 +0000 (18:14 -0600)
committerKeith Whitwell <keith@tungstengraphics.com>
Mon, 22 Sep 2008 05:13:57 +0000 (22:13 -0700)
(cherry picked from commit 815cdcfbc0740c66b901361620c88d99541bdad2)

src/mesa/main/context.c
src/mesa/main/context.h
src/mesa/main/points.c

index d6205fc4536f37d79f495eab56b6b0b1a935f086..a41cb42952efa6f06643fa0ed1075b3e143ece92 100644 (file)
@@ -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;
index bb6f3acf062ace9b16e5f990aaf1df33a94d2a37..54f1af911d3b95d0942278af356469fd65d4f791 100644 (file)
@@ -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 );
 
index e450b15139897fa82974ab96872de3d0dcaaed05..7e189a0a8c9dcec51e193c11d9337309d453d5fb 100644 (file)
@@ -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++) {