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)
committerAndreas Boll <andreas.boll.dev@gmail.com>
Sun, 20 Jan 2013 14:08:27 +0000 (15:08 +0100)
commit2d00d104b4c0c7e51b6f969b658573cbe60b0046
tree1b76f3c841040a59eb1ebdc912a24f486f6ba6ff
parent422f3bb8ab95f00e17aa969f7a09c7ceee5f8bef
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>
(cherry picked from commit eabbe5c45f5d05822c5f841628afa4008398d553)
src/mesa/main/attrib.c