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
|
@ -100,7 +100,9 @@ class COpenGLCoreCacheHandler
|
|||
GL.Enable(curTextureType);
|
||||
#endif
|
||||
|
||||
GL.BindTexture(curTextureType, static_cast<const TOpenGLTexture *>(texture)->getOpenGLTextureName());
|
||||
auto name = static_cast<const TOpenGLTexture *>(texture)->getOpenGLTextureName();
|
||||
_IRR_DEBUG_BREAK_IF(name == 0)
|
||||
GL.BindTexture(curTextureType, name);
|
||||
} else {
|
||||
texture = 0;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue