1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-27 17:28:41 +00:00

Improve robustness of GL object handling

This commit is contained in:
sfan5 2025-03-12 19:46:12 +01:00
parent 077828d0d9
commit 4b85062caf
4 changed files with 23 additions and 2 deletions

View file

@ -35,8 +35,14 @@ public:
ColorAttachment = Driver->getFeature().ColorAttachment;
MultipleRenderTarget = Driver->getFeature().MultipleRenderTarget;
if (ColorAttachment > 0)
if (ColorAttachment > 0) {
TEST_GL_ERROR(Driver);
Driver->irrGlGenFramebuffers(1, &BufferID);
if (!BufferID) {
os::Printer::log("COpenGLCoreRenderTarget: framebuffer not created", ELL_ERROR);
return;
}
}
AssignedTextures.set_used(static_cast<u32>(ColorAttachment));