aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2012-08-15 08:45:03 -0700
committerIan Romanick <[email protected]>2012-08-29 15:09:36 -0700
commitc85a9a99965745bac23a72a6794cd9d9493e27be (patch)
treea90cce2e881d337f372b465cae9870b8873bdf15 /src/mesa
parent7d8d1c781967e0c29b0523e2c8056c2d7412dd60 (diff)
mesa: Non-sprite points are deprecated
Signed-off-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/points.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/mesa/main/points.c b/src/mesa/main/points.c
index d66af2fa156..538f3cf4444 100644
--- a/src/mesa/main/points.c
+++ b/src/mesa/main/points.c
@@ -248,7 +248,19 @@ _mesa_init_point(struct gl_context *ctx)
ctx->Point.MaxSize
= MAX2(ctx->Const.MaxPointSize, ctx->Const.MaxPointSizeAA);
ctx->Point.Threshold = 1.0;
- ctx->Point.PointSprite = GL_FALSE; /* GL_ARB/NV_point_sprite */
+
+ /* Page 403 (page 423 of the PDF) of the OpenGL 3.0 spec says:
+ *
+ * "Non-sprite points (section 3.4) - Enable/Disable targets
+ * POINT_SMOOTH and POINT_SPRITE, and all associated state. Point
+ * rasterization is always performed as though POINT_SPRITE were
+ * enabled."
+ *
+ * In a core context, the state will default to true, and the setters and
+ * getters are disabled.
+ */
+ ctx->Point.PointSprite = (ctx->API == API_OPENGL_CORE);
+
ctx->Point.SpriteRMode = GL_ZERO; /* GL_NV_point_sprite (only!) */
ctx->Point.SpriteOrigin = GL_UPPER_LEFT; /* GL_ARB_point_sprite */
for (i = 0; i < Elements(ctx->Point.CoordReplace); i++) {