gsdx ogl: move the validation of the gl context in the window

This commit is contained in:
Gregory Hainaut 2017-02-22 21:31:14 +01:00
parent b3836c58d2
commit 714fcaaadd
3 changed files with 8 additions and 11 deletions

View File

@ -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
// ****************************************************************

View File

@ -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

View File

@ -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();
}