mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-06 17:41:04 +00:00
Improve error checks in COpenGL3DriverBase
This commit is contained in:
parent
7a6ca85081
commit
13e271c6cb
6 changed files with 99 additions and 31 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue