According the man page, GL_INVALID_OPERATION should be generated if
glIsEnabled is executed betwwen the execution of glBegin and the
correspoding execution of glEnd.

Signed-off-by: Yuanhan Liu <yuanhan....@linux.intel.com>
---
 src/mesa/main/enable.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c
index 4bf1809..2d857c1 100644
--- a/src/mesa/main/enable.c
+++ b/src/mesa/main/enable.c
@@ -1072,6 +1072,8 @@ GLboolean GLAPIENTRY
 _mesa_IsEnabled( GLenum cap )
 {
    GET_CURRENT_CONTEXT(ctx);
+   ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, 0);
+
    switch (cap) {
       case GL_ALPHA_TEST:
          return ctx->Color.AlphaEnabled;
-- 
1.7.4.4

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to