mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 00:00:11 +01:00
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).
This commit is contained in:
parent
e4c5fe52c9
commit
0528f40e3b
1 changed files with 6 additions and 1 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue