I use QT 4.8.4 and draw OpenGL against the background of QGraphicsScene. The problem is that I get an invalid return from glGetError () . My code snippet:
while (GLenum err = glGetError() != GL_NO_ERROR) { std::cerr << err; }
In the output of the application, I get a lot of lines with number 1
From the documentation, I see the possible values:
GL_NO_ERROR, GL_INVALID_ENUM, GL_INVALID_VALUE, GL_INVALID_OPERATION, GL_INVALID_FRAMEBUFFER_OPERATION, GL_OUT_OF_MEMORY, GL_STACK_UNDERFLOW, GL_STACK_OVERFLOW
which are defined as 0, 0x0500, 0x0501, 0x0502, 0x0503, 0x0504, 0x0505, 0x0506.
How is this possible I get 1 instead of the correct error code?
It started when I wrapped my own OpenGL drawing code with QT:
painter->beginNativePainting(); ... painter->endNativePainting();
PS: Set 1 of several drawing calls, not a loop.
source share