Skip to content

Commit 1bf74f1

Browse files
committed
GPU Display OpenGL: Ignore stale errors from the frontend
1 parent 12db80a commit 1bf74f1

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎GPU/GPUTracking/display/backend/GPUDisplayBackendOpenGL.cxx‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,11 @@ int32_t GPUDisplayBackendOpenGL::checkProgramStatus(uint32_t program)
269269

270270
int32_t GPUDisplayBackendOpenGL::InitBackendA()
271271
{
272+
for (GLenum err = glGetError(); err != GL_NO_ERROR; err = glGetError()) { // Left by the frontend (freeglut with a core profile context leaves GL_INVALID_ENUM), CHKERR below would report it for the wrong call
273+
if (mDisplay->GetProcessingSettings().debugLevel >= 2) {
274+
GPUInfo("Ignoring OpenGL error %d from before the backend initialization", (int32_t)err);
275+
}
276+
}
272277
if (mDisplay->GetProcessingSettings().debugLevel >= 2) {
273278
auto renderer = glGetString(GL_RENDERER);
274279
GPUInfo("Renderer: %s", (const char*)renderer);

0 commit comments

Comments
 (0)