79550699

Date: 2025-04-02 13:06:15
Score: 1
Natty:
Report link

I hope the issue has been fixed by now 😂, but for any developer looking up on this issue, please remember to call glGetError() in a loop and make sure it is clear, as the function returns one error at a time, while functions can output more than one.

It is hard to deduce what's going on since OpenGL is highly contextual, more code is needed regarding the current state of things in the GL context.

I do strongly recommend to use a wrapper function for glGetError, or even move to glDebugMessageCallback.

static void GLClearErrors() {
    while (glGetError() != GL_NO_ERROR);
}

static void GLCheckErrors() {
    while (GLenum error = glGetError()) {
        std::cout << "[OpenGL error] " << error << std::endl;
    }
}

it is the little functions like these that ensure safety in your code, simple yet darn useful.

Reasons:
  • Blacklisted phrase (1): 😂
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: John Baxter