Merge pull request #6647 from deathbeam/properly-close-gl-context

Properly close GL context and lock surface
This commit is contained in:
Tomas Slusny
2018-11-25 10:36:25 +00:00
committed by GitHub

View File

@@ -376,17 +376,20 @@ public class GpuPlugin extends Plugin implements DrawCallbacks
shutdownProgram();
shutdownVao();
shutdownStretchedFbo();
}
if (jawtWindow != null)
{
if (!jawtWindow.getLock().isLocked())
{
jawtWindow.lockSurface();
}
glContext.destroy();
}
if (glContext != null)
{
glContext.destroy();
}
if (jawtWindow != null)
{
NewtFactoryAWT.destroyNativeWindow(jawtWindow);
}