diff --git a/plugins/GSdx/GSDeviceOGL.cpp b/plugins/GSdx/GSDeviceOGL.cpp index e3337a523f..2667633d61 100644 --- a/plugins/GSdx/GSDeviceOGL.cpp +++ b/plugins/GSdx/GSDeviceOGL.cpp @@ -54,7 +54,6 @@ FILE* GSDeviceOGL::m_debug_gl_file = NULL; GSDeviceOGL::GSDeviceOGL() : m_msaa(0) , m_force_texture_clear(0) - , m_window(NULL) , m_fbo(0) , m_fbo_read(0) , m_va(NULL) @@ -289,14 +288,6 @@ GSTexture* GSDeviceOGL::FetchSurface(int type, int w, int h, bool msaa, int form bool GSDeviceOGL::Create(GSWnd* wnd) { - if (m_window == NULL) { - if (!GLLoader::check_gl_version(3, 3)) return false; - - if (!GLLoader::check_gl_supported_extension()) return false; - } - - m_window = wnd; - // **************************************************************** // Debug helper // **************************************************************** diff --git a/plugins/GSdx/GSDeviceOGL.h b/plugins/GSdx/GSDeviceOGL.h index c082f0b17d..3778a987b4 100644 --- a/plugins/GSdx/GSDeviceOGL.h +++ b/plugins/GSdx/GSDeviceOGL.h @@ -418,8 +418,6 @@ public: bool m_disable_hw_gl_draw; - GSWnd* m_window; - GLuint m_fbo; // frame buffer container GLuint m_fbo_read; // frame buffer container only for reading diff --git a/plugins/GSdx/GSWnd.cpp b/plugins/GSdx/GSWnd.cpp index 8158217cfa..e25c331d42 100644 --- a/plugins/GSdx/GSWnd.cpp +++ b/plugins/GSdx/GSWnd.cpp @@ -178,4 +178,12 @@ void GSWndGL::PopulateGlFunction() GL_EXT_LOAD(glGenProgramPipelines); GL_EXT_LOAD(glGenerateMipmap); #endif + + // Check openGL requirement as soon as possible so we can switch to another + // renderer/device + if (!GLLoader::check_gl_version(3, 3)) + throw GSDXRecoverableError(); + + if (!GLLoader::check_gl_supported_extension()) + throw GSDXRecoverableError(); }