mesa: set point state
authorBrian Paul <brian.paul@tungstengraphics.com>
Tue, 12 Aug 2008 16:00:36 +0000 (10:00 -0600)
committerKeith Whitwell <keith@tungstengraphics.com>
Mon, 22 Sep 2008 05:13:57 +0000 (22:13 -0700)
(cherry picked from commit af3d9dba562813ffed71691bffd7faf6665c4487)

src/mesa/main/points.c
src/mesa/shader/program.c

index 7e189a0a8c9dcec51e193c11d9337309d453d5fb..e450b15139897fa82974ab96872de3d0dcaaed05 100644 (file)
@@ -254,7 +254,11 @@ _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++) {
index 55f862a392c88f408703d06304ade5b2abafe087..b3618641e50ebe745e7f39f385b300196f88b30e 100644 (file)
@@ -58,7 +58,11 @@ _mesa_init_program(GLcontext *ctx)
 
 #if FEATURE_NV_vertex_program || FEATURE_ARB_vertex_program
    ctx->VertexProgram.Enabled = GL_FALSE;
+#if FEATURE_es2_glsl
+   ctx->VertexProgram.PointSizeEnabled = GL_TRUE;
+#else
    ctx->VertexProgram.PointSizeEnabled = GL_FALSE;
+#endif
    ctx->VertexProgram.TwoSideEnabled = GL_FALSE;
    _mesa_reference_vertprog(ctx, &ctx->VertexProgram.Current,
                             ctx->Shared->DefaultVertexProgram);