summaryrefslogtreecommitdiff
path: root/src/mesa/main/points.c
diff options
context:
space:
mode:
authorDaniel Borca <dborca@users.sourceforge.net>2004-09-13 08:47:01 +0000
committerDaniel Borca <dborca@users.sourceforge.net>2004-09-13 08:47:01 +0000
commita9ea1628da5f17274cd7ee023f438046dc992073 (patch)
tree23bcf6e863b2e02e9967534aae683b8e93fe992d /src/mesa/main/points.c
parente54464e9d3035e3f785bcfaf924e947b522427d6 (diff)
changes towards GL_ARB_point_sprite (two-zero)
Diffstat (limited to 'src/mesa/main/points.c')
-rw-r--r--src/mesa/main/points.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/mesa/main/points.c b/src/mesa/main/points.c
index cbb91554a1..5f5e01039c 100644
--- a/src/mesa/main/points.c
+++ b/src/mesa/main/points.c
@@ -229,6 +229,27 @@ _mesa_PointParameterfvEXT( GLenum pname, const GLfloat *params)
return;
}
break;
+#if GL_VERSION_2_0
+ case GL_POINT_SPRITE_COORD_ORIGIN:
+ if (ctx->Extensions.ARB_point_sprite) {
+ GLenum value = (GLenum) params[0];
+ if (value != GL_LOWER_LEFT && value != GL_UPPER_LEFT) {
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glPointParameterf[v]{EXT,ARB}(param)");
+ return;
+ }
+ if (ctx->Point.SpriteOrigin == value)
+ return;
+ FLUSH_VERTICES(ctx, _NEW_POINT);
+ ctx->Point.SpriteOrigin = value;
+ }
+ else {
+ _mesa_error(ctx, GL_INVALID_ENUM,
+ "glPointParameterf[v]{EXT,ARB}(pname)");
+ return;
+ }
+ break;
+#endif
default:
_mesa_error( ctx, GL_INVALID_ENUM,
"glPointParameterf[v]{EXT,ARB}(pname)" );
@@ -266,6 +287,9 @@ void _mesa_init_point( GLcontext * ctx )
ctx->Point.Threshold = 1.0;
ctx->Point.PointSprite = GL_FALSE; /* GL_ARB_point_sprite / GL_NV_point_sprite */
ctx->Point.SpriteRMode = GL_ZERO; /* GL_NV_point_sprite (only!) */
+#if GL_VERSION_2_0
+ ctx->Point.SpriteOrigin = GL_UPPER_LEFT; /* GL_ARB_point_sprite */
+#endif
for (i = 0; i < MAX_TEXTURE_UNITS; i++) {
ctx->Point.CoordReplace[i] = GL_FALSE; /* GL_ARB_point_sprite / GL_NV_point_sprite */
}