summaryrefslogtreecommitdiff
path: root/platform/windows/context_gl_win.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'platform/windows/context_gl_win.cpp')
-rw-r--r--platform/windows/context_gl_win.cpp21
1 files changed, 0 insertions, 21 deletions
diff --git a/platform/windows/context_gl_win.cpp b/platform/windows/context_gl_win.cpp
index a158237418..794f6df31f 100644
--- a/platform/windows/context_gl_win.cpp
+++ b/platform/windows/context_gl_win.cpp
@@ -68,20 +68,6 @@ void ContextGL_Win::swap_buffers() {
SwapBuffers(hDC);
}
-/*
-static GLWrapperFuncPtr wrapper_get_proc_address(const char* p_function) {
-
- print_line(String()+"getting proc of: "+p_function);
- GLWrapperFuncPtr func=(GLWrapperFuncPtr)get_gl_proc_address(p_function);
- if (!func) {
- print_line("Couldn't find function: "+String(p_function));
- print_line("error: "+itos(GetLastError()));
- }
- return func;
-
-}
-*/
-
void ContextGL_Win::set_use_vsync(bool p_use) {
if (wglSwapIntervalEXT) {
@@ -122,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
}
@@ -165,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;
}
@@ -173,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);
@@ -182,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
}
}