mesa: Don't glPopAttrib() GL_POINT_SPRITE_COORD_ORIGIN on < OpenGL-2.0
authorMario Kleiner <mario.kleiner@tuebingen.mpg.de>
Sun, 7 Oct 2012 01:44:14 +0000 (03:44 +0200)
committerKenneth Graunke <kenneth@whitecape.org>
Fri, 9 Nov 2012 06:53:54 +0000 (22:53 -0800)
commiteabbe5c45f5d05822c5f841628afa4008398d553
tree029aa90207e8b83f4e0147771c0ea57045244ad9
parentc299f44782d7d7d6719fce622a121aad58856139
mesa: Don't glPopAttrib() GL_POINT_SPRITE_COORD_ORIGIN on < OpenGL-2.0

The GL_POINT_BIT state attribute GL_POINT_SPRITE_COORD_ORIGIN
is only supported on OpenGL-2.0 or later. Prevent glPopAttrib()
from trying to restore it on OpenGL-1.4 implementations which
support GL_ARB_POINT_SPRITE, as otherwise the sequence...

glPushAttrib(GL_POINT_BIT);
glPopAttrib();

throws an GL_INVALID_ENUM error in glPopAttrib().

See also commit f778174ea1e431a7113f12c12beb4aba9e825a9f

NOTE: This is a candidate for the 9.0 branch.

Signed-off-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/main/attrib.c