Browse Source

openGL: deactivating context on shutdown.

tags/2021-05-28
jules 13 years ago
parent
commit
ffdca01800
3 changed files with 3 additions and 2 deletions
  1. +1
    -0
      modules/juce_opengl/native/juce_OpenGL_ios.h
  2. +1
    -1
      modules/juce_opengl/native/juce_OpenGL_osx.h
  3. +1
    -1
      modules/juce_opengl/native/juce_OpenGL_win32.h

+ 1
- 0
modules/juce_opengl/native/juce_OpenGL_ios.h View File

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


+ 1
- 1
modules/juce_opengl/native/juce_OpenGL_osx.h 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); }


+ 1
- 1
modules/juce_opengl/native/juce_OpenGL_win32.h 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; }


Loading…
Cancel
Save