1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-14 00:14:18 +00:00

openGL: deactivating context on shutdown.

This commit is contained in:
jules 2012-05-04 13:00:01 +01:00
parent bd0741f9a9
commit ffdca01800
3 changed files with 3 additions and 2 deletions

View file

@ -99,6 +99,7 @@ public:
{
JUCE_CHECK_OPENGL_ERROR
freeGLBuffers();
deactivateCurrentContext();
}
bool createdOk() const noexcept { return getRawContext() != nullptr; }

View file

@ -163,7 +163,7 @@ public:
}
void initialiseOnRenderThread() {}
void shutdownOnRenderThread() {}
void shutdownOnRenderThread() { deactivateCurrentContext(); }
bool createdOk() const noexcept { return getRawContext() != nullptr; }
void* getRawContext() const noexcept { return static_cast <void*> (renderContext); }

View file

@ -82,7 +82,7 @@ public:
}
void initialiseOnRenderThread() {}
void shutdownOnRenderThread() {}
void shutdownOnRenderThread() { deactivateCurrentContext(); }
static void deactivateCurrentContext() { wglMakeCurrent (0, 0); }
bool makeActive() const noexcept { return wglMakeCurrent (dc, renderContext) != FALSE; }