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:
parent
bd0741f9a9
commit
ffdca01800
3 changed files with 3 additions and 2 deletions
|
|
@ -99,6 +99,7 @@ public:
|
|||
{
|
||||
JUCE_CHECK_OPENGL_ERROR
|
||||
freeGLBuffers();
|
||||
deactivateCurrentContext();
|
||||
}
|
||||
|
||||
bool createdOk() const noexcept { return getRawContext() != nullptr; }
|
||||
|
|
|
|||
|
|
@ -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); }
|
||||
|
|
|
|||
|
|
@ -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; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue