Merge pull request #6647 from deathbeam/properly-close-gl-context
Properly close GL context and lock surface
This commit is contained in:
@@ -376,17 +376,20 @@ public class GpuPlugin extends Plugin implements DrawCallbacks
|
|||||||
shutdownProgram();
|
shutdownProgram();
|
||||||
shutdownVao();
|
shutdownVao();
|
||||||
shutdownStretchedFbo();
|
shutdownStretchedFbo();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (jawtWindow != null)
|
||||||
|
{
|
||||||
if (!jawtWindow.getLock().isLocked())
|
if (!jawtWindow.getLock().isLocked())
|
||||||
{
|
{
|
||||||
jawtWindow.lockSurface();
|
jawtWindow.lockSurface();
|
||||||
}
|
}
|
||||||
|
|
||||||
glContext.destroy();
|
if (glContext != null)
|
||||||
}
|
{
|
||||||
|
glContext.destroy();
|
||||||
|
}
|
||||||
|
|
||||||
if (jawtWindow != null)
|
|
||||||
{
|
|
||||||
NewtFactoryAWT.destroyNativeWindow(jawtWindow);
|
NewtFactoryAWT.destroyNativeWindow(jawtWindow);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user