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:
parent
077828d0d9
commit
4b85062caf
4 changed files with 23 additions and 2 deletions
|
@ -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));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue