mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
OpenGLFrameBuffer: Add early-exit in ~TransientState
This commit is contained in:
parent
1900dd4e4a
commit
ac65cc5434
1 changed files with 10 additions and 10 deletions
|
|
@ -375,19 +375,19 @@ private:
|
|||
|
||||
~TransientState()
|
||||
{
|
||||
if (OpenGLHelpers::isContextActive())
|
||||
{
|
||||
if (textureID != 0)
|
||||
gl::glDeleteTextures (1, &textureID);
|
||||
if (! OpenGLHelpers::isContextActive())
|
||||
return;
|
||||
|
||||
if (depthOrStencilBuffer != 0)
|
||||
gl::glDeleteRenderbuffers (1, &depthOrStencilBuffer);
|
||||
if (textureID != 0)
|
||||
gl::glDeleteTextures (1, &textureID);
|
||||
|
||||
if (frameBufferID != 0)
|
||||
gl::glDeleteFramebuffers (1, &frameBufferID);
|
||||
if (depthOrStencilBuffer != 0)
|
||||
gl::glDeleteRenderbuffers (1, &depthOrStencilBuffer);
|
||||
|
||||
JUCE_CHECK_OPENGL_ERROR
|
||||
}
|
||||
if (frameBufferID != 0)
|
||||
gl::glDeleteFramebuffers (1, &frameBufferID);
|
||||
|
||||
JUCE_CHECK_OPENGL_ERROR
|
||||
}
|
||||
|
||||
bool createdOk() const
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue