@ -141,7 +141,7 @@ public:
}
~OpenGLSharedContext() {
context->doneCurrent();
DoneCurrent();
void SwapBuffers() override {
@ -156,6 +156,9 @@ public:
void DoneCurrent() override {
if (!is_current) {
return;
is_current = false;
@ -37,16 +37,24 @@ public:
void MakeCurrent() override {
SDL_GL_MakeCurrent(window, context);
if (is_current) {
is_current = SDL_GL_MakeCurrent(window, context) == 0;
SDL_GL_MakeCurrent(window, nullptr);
private:
SDL_Window* window;
SDL_GLContext context;
bool is_current = false;
};
bool EmuWindow_SDL2_GL::SupportsRequiredGLExtensions() {