diff options
author | Ian Romanick <[email protected]> | 2009-11-25 16:31:28 -0800 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2009-11-25 16:31:28 -0800 |
commit | 0528f40e3b8ca3e59d3a641c4504d34cf9364578 (patch) | |
tree | d3ce521a33b87afa090e73decb34ca3de0170454 /src/mesa/main/points.c | |
parent | e4c5fe52c99bdf651aafa1569d9cf901891004d8 (diff) |
Improve implementation of GL_POINT_SPRITE_COORD_ORIGIN errors
This enum is only supported for OpenGL 2.0. If a driver supports
OpenGL 1.4 and GL_ARB_point_sprite, using this enum should generate an
error. This is important because, for example, i915 and i830 can
support GL_ARB_point_sprite, but they cannot support
GL_POINT_SPRITE_COORD_ORIGIN.
This commit just removes the check for NV_point_sprite, which is
completely wrong, and add some comments describing what the code
should do. I don't see an easy way to check for version >= 2.0 from
inside Mesa. Perhaps we should add an extension
GL_MESA_point_sprite_20 (like Intel's old GL_EXT_packed_pixels_12) to
indicate that this added bit of functionality is available.
Also note that glean's pointSprite test only checks for
GL_ARB_point_sprite before trying to use
GL_POINT_SPRITE_COORD_ORIGIN. Naturally, that fails on
non-2.0 implementations (i.e., Mac OS X on GMA 950).
Diffstat (limited to 'src/mesa/main/points.c')
-rw-r--r-- | src/mesa/main/points.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mesa/main/points.c b/src/mesa/main/points.c index 4c8fc1f72e0..b3305448904 100644 --- a/src/mesa/main/points.c +++ b/src/mesa/main/points.c @@ -200,7 +200,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, |