summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYuanhan Liu <[email protected]>2011-09-19 15:02:59 +0800
committerBrian Paul <[email protected]>2011-09-19 08:11:51 -0600
commitf1ddde5c16ef61a6c08af012af3e5f34aebaf7a0 (patch)
tree2d0e2ac988543715453463cf7922f972cd9e599b
parent21b2895bd0df1b7b6f6defeff1dc2084152f51e5 (diff)
mesa: fix error handling for some glGet* functions
According to the man page, it should trigger a GL_INVALID_OPERATION while calling some glGet* functions inside glBegin and glEnd. This patch dose handle the following functions: glGetBooleanv glGetFloatv glGetIntegerv glGetInteger64v glGetDoublev Signed-off-by: Yuanhan Liu <[email protected]> Signed-off-by: Brian Paul <[email protected]>
-rw-r--r--src/mesa/main/get.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c
index a777bd8c403..45b27777a2b 100644
--- a/src/mesa/main/get.c
+++ b/src/mesa/main/get.c
@@ -1924,6 +1924,9 @@ _mesa_GetBooleanv(GLenum pname, GLboolean *params)
GLmatrix *m;
int shift, i;
void *p;
+ GET_CURRENT_CONTEXT(ctx);
+
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
d = find_value("glGetBooleanv", pname, &p, &v);
switch (d->type) {
@@ -2008,6 +2011,9 @@ _mesa_GetFloatv(GLenum pname, GLfloat *params)
GLmatrix *m;
int shift, i;
void *p;
+ GET_CURRENT_CONTEXT(ctx);
+
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
d = find_value("glGetFloatv", pname, &p, &v);
switch (d->type) {
@@ -2092,6 +2098,9 @@ _mesa_GetIntegerv(GLenum pname, GLint *params)
GLmatrix *m;
int shift, i;
void *p;
+ GET_CURRENT_CONTEXT(ctx);
+
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
d = find_value("glGetIntegerv", pname, &p, &v);
switch (d->type) {
@@ -2183,6 +2192,9 @@ _mesa_GetInteger64v(GLenum pname, GLint64 *params)
GLmatrix *m;
int shift, i;
void *p;
+ GET_CURRENT_CONTEXT(ctx);
+
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
d = find_value("glGetInteger64v", pname, &p, &v);
switch (d->type) {
@@ -2274,6 +2286,9 @@ _mesa_GetDoublev(GLenum pname, GLdouble *params)
GLmatrix *m;
int shift, i;
void *p;
+ GET_CURRENT_CONTEXT(ctx);
+
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
d = find_value("glGetDoublev", pname, &p, &v);
switch (d->type) {