Added a missing enum to the glcheckerror class

This commit is contained in:
Paolo Cignoni 2014-01-28 08:22:02 +00:00
parent 0ba814697c
commit 234d74354d
1 changed files with 29 additions and 27 deletions

View File

@ -25,7 +25,7 @@
#include <QMessageBox>
class checkGLError
{
public:
public:
static QString makeString(const char* m)
{
QString message(m);
@ -33,12 +33,13 @@ class checkGLError
switch(glGetError()) {
case GL_NO_ERROR: return QString();
case GL_INVALID_ENUM: message+=(": invalid enum"); break;
case GL_INVALID_VALUE: message+=(": invalid value"); break;
case GL_INVALID_OPERATION: message+=(": invalid operation"); break;
case GL_STACK_OVERFLOW: message+=(": stack overflow"); break;
case GL_STACK_UNDERFLOW: message+=(": stack underflow"); break;
case GL_OUT_OF_MEMORY: message+=(": out of memory"); break;
case GL_INVALID_ENUM: message+=("invalid enum"); break;
case GL_INVALID_VALUE: message+=("invalid value"); break;
case GL_INVALID_OPERATION: message+=("invalid operation"); break;
case GL_STACK_OVERFLOW: message+=("stack overflow"); break;
case GL_STACK_UNDERFLOW: message+=("stack underflow"); break;
case GL_OUT_OF_MEMORY: message+=("out of memory"); break;
case GL_INVALID_FRAMEBUFFER_OPERATION: message+=("invalid framebuffer operation"); break;
}
return message;
}
@ -53,5 +54,6 @@ class checkGLError
QString message=makeString(m);
QMessageBox::warning(0, title,message);
}
static void QMessageBox(const char* m) {QMessageBox(m,"GL error");};
static void QMessageBox(const char* m) {QMessageBox(m,"GL error");}
};