mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 00:25:19 +02:00
Improve error checks in COpenGL3DriverBase
This commit is contained in:
@@ -174,9 +174,7 @@ public:
|
||||
AssignedTextures[i] = GL_COLOR_ATTACHMENT0 + i;
|
||||
GLenum textarget = currentTexture->getType() == ETT_2D ? GL_TEXTURE_2D : GL_TEXTURE_CUBE_MAP_POSITIVE_X + (int)CubeSurfaces[i];
|
||||
Driver->irrGlFramebufferTexture2D(GL_FRAMEBUFFER, AssignedTextures[i], textarget, textureID, 0);
|
||||
#ifdef _DEBUG
|
||||
Driver->testGLError(__LINE__);
|
||||
#endif
|
||||
TEST_GL_ERROR(Driver);
|
||||
} else if (AssignedTextures[i] != GL_NONE) {
|
||||
AssignedTextures[i] = GL_NONE;
|
||||
Driver->irrGlFramebufferTexture2D(GL_FRAMEBUFFER, AssignedTextures[i], GL_TEXTURE_2D, 0, 0);
|
||||
@@ -239,9 +237,7 @@ public:
|
||||
AssignedDepth = false;
|
||||
AssignedStencil = false;
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
Driver->testGLError(__LINE__);
|
||||
#endif
|
||||
TEST_GL_ERROR(Driver);
|
||||
|
||||
RequestDepthStencilUpdate = false;
|
||||
}
|
||||
@@ -261,9 +257,7 @@ public:
|
||||
Driver->irrGlDrawBuffers(bufferCount, AssignedTextures.pointer());
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
Driver->testGLError(__LINE__);
|
||||
#endif
|
||||
TEST_GL_ERROR(Driver);
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
|
Reference in New Issue
Block a user