diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2018-08-27 16:54:22 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-27 16:54:22 +0200 |
commit | c1f687c6818883f70c2b7f85577c51ed5ad65c08 (patch) | |
tree | 68bf6b19674bd54ab6662a12cfd6aee37a4a4d83 /platform/windows/context_gl_win.cpp | |
parent | 78bb53f85d97d3a5b66d9005732c3c07c1f0e636 (diff) | |
parent | 08f452d1a95d7f171472c33a60983d95adf1665d (diff) | |
download | redot-engine-c1f687c6818883f70c2b7f85577c51ed5ad65c08.tar.gz |
Merge pull request #21387 from hpvb/fix-15324
Fall back to GLES2 if GLES3 is not working
Diffstat (limited to 'platform/windows/context_gl_win.cpp')
-rw-r--r-- | platform/windows/context_gl_win.cpp | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/platform/windows/context_gl_win.cpp b/platform/windows/context_gl_win.cpp index 59435b04ea..794f6df31f 100644 --- a/platform/windows/context_gl_win.cpp +++ b/platform/windows/context_gl_win.cpp @@ -108,28 +108,24 @@ Error ContextGL_Win::initialize() { hDC = GetDC(hWnd); if (!hDC) { - MessageBox(NULL, "Can't Create A GL Device Context.", "ERROR", MB_OK | MB_ICONEXCLAMATION); return ERR_CANT_CREATE; // Return FALSE } pixel_format = ChoosePixelFormat(hDC, &pfd); if (!pixel_format) // Did Windows Find A Matching Pixel Format? { - MessageBox(NULL, "Can't Find A Suitable pixel_format.", "ERROR", MB_OK | MB_ICONEXCLAMATION); return ERR_CANT_CREATE; // Return FALSE } BOOL ret = SetPixelFormat(hDC, pixel_format, &pfd); if (!ret) // Are We Able To Set The Pixel Format? { - MessageBox(NULL, "Can't Set The pixel_format.", "ERROR", MB_OK | MB_ICONEXCLAMATION); return ERR_CANT_CREATE; // Return FALSE } hRC = wglCreateContext(hDC); if (!hRC) // Are We Able To Get A Rendering Context? { - MessageBox(NULL, "Can't Create A Temporary GL Rendering Context.", "ERROR", MB_OK | MB_ICONEXCLAMATION); return ERR_CANT_CREATE; // Return FALSE } @@ -151,7 +147,6 @@ Error ContextGL_Win::initialize() { if (wglCreateContextAttribsARB == NULL) //OpenGL 3.0 is not supported { - MessageBox(NULL, "Cannot get Proc Address for CreateContextAttribs", "ERROR", MB_OK | MB_ICONEXCLAMATION); wglDeleteContext(hRC); return ERR_CANT_CREATE; } @@ -159,7 +154,6 @@ Error ContextGL_Win::initialize() { HGLRC new_hRC = wglCreateContextAttribsARB(hDC, 0, attribs); if (!new_hRC) { wglDeleteContext(hRC); - MessageBox(NULL, "Can't Create An OpenGL 3.3 Rendering Context.", "ERROR", MB_OK | MB_ICONEXCLAMATION); return ERR_CANT_CREATE; // Return false } wglMakeCurrent(hDC, NULL); @@ -168,7 +162,6 @@ Error ContextGL_Win::initialize() { if (!wglMakeCurrent(hDC, hRC)) // Try To Activate The Rendering Context { - MessageBox(NULL, "Can't Activate The GL 3.3 Rendering Context.", "ERROR", MB_OK | MB_ICONEXCLAMATION); return ERR_CANT_CREATE; // Return FALSE } } |