mesa: allow for extra per-context init
authorBrian Paul <brian.paul@tungstengraphics.com>
Wed, 20 Aug 2008 00:14:15 +0000 (18:14 -0600)
committerBrian Paul <brian.paul@tungstengraphics.com>
Wed, 20 Aug 2008 00:14:15 +0000 (18:14 -0600)
src/mesa/main/context.c
src/mesa/main/context.h
src/mesa/main/points.c

index 32460e92c3c675b7f244d69346a10ef69f4c3bef..ed3faecf0dbb00cca216ac726a095cac936e5b2d 100644 (file)
@@ -1214,6 +1214,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 099912aa15259d707cc5c2977b0d15ba092b17ac..9423b66a7d8ac08eab51ce4b3ac023f95ca1522b 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 d16344a42c31e1b53566aed6894fec1f70ee6b1b..fbedbcb22c497756a6e607f76c0d08070c73bb38 100644 (file)
@@ -244,11 +244,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++) {