summaryrefslogtreecommitdiff
path: root/src/mesa/main/points.c
diff options
context:
space:
mode:
authorMichal Krol <michal@vmware.com>2009-12-12 16:48:32 +0100
committerMichal Krol <michal@vmware.com>2009-12-12 16:48:32 +0100
commita3eb0f718e19653a2ad8e49396c904183be456f3 (patch)
tree0092574c469ea586a6cab8b8ebb7ac62b8221a2a /src/mesa/main/points.c
parent491f384c3958067e6c4c994041f5d8d413b806bc (diff)
parent784cca9fa527de771754d76545970f78094b9adf (diff)
Merge branch 'master' into glsl-pp-rework-2
Conflicts: progs/perf/drawoverhead.c progs/perf/teximage.c progs/perf/vbo.c progs/perf/vertexrate.c src/mesa/shader/slang/library/slang_common_builtin_gc.h
Diffstat (limited to 'src/mesa/main/points.c')
-rw-r--r--src/mesa/main/points.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/mesa/main/points.c b/src/mesa/main/points.c
index 4c8fc1f72e..dcaeccd90d 100644
--- a/src/mesa/main/points.c
+++ b/src/mesa/main/points.c
@@ -69,8 +69,10 @@ _mesa_PointSize( GLfloat size )
void GLAPIENTRY
_mesa_PointParameteri( GLenum pname, GLint param )
{
- const GLfloat value = (GLfloat) param;
- _mesa_PointParameterfv(pname, &value);
+ GLfloat p[3];
+ p[0] = (GLfloat) param;
+ p[1] = p[2] = 0.0F;
+ _mesa_PointParameterfv(pname, p);
}
@@ -90,7 +92,10 @@ _mesa_PointParameteriv( GLenum pname, const GLint *params )
void GLAPIENTRY
_mesa_PointParameterf( GLenum pname, GLfloat param)
{
- _mesa_PointParameterfv(pname, &param);
+ GLfloat p[3];
+ p[0] = param;
+ p[1] = p[2] = 0.0F;
+ _mesa_PointParameterfv(pname, p);
}
@@ -200,7 +205,12 @@ _mesa_PointParameterfv( GLenum pname, const GLfloat *params)
}
break;
case GL_POINT_SPRITE_COORD_ORIGIN:
- if (ctx->Extensions.ARB_point_sprite || ctx->Extensions.NV_point_sprite) {
+ /* This is not completely correct. GL_POINT_SPRITE_COORD_ORIGIN was
+ * added to point sprites when the extension was merged into OpenGL
+ * 2.0. It is expected that an implementation supporting OpenGL 1.4
+ * and GL_ARB_point_sprite will generate an error here.
+ */
+ 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,