diff --git a/Source/Core/DolphinWX/GLInterface/WGL.cpp b/Source/Core/DolphinWX/GLInterface/WGL.cpp index 34c5e6a465..8bc9e7a73a 100644 --- a/Source/Core/DolphinWX/GLInterface/WGL.cpp +++ b/Source/Core/DolphinWX/GLInterface/WGL.cpp @@ -14,9 +14,13 @@ static HDC hDC = NULL; // Private GDI Device Context static HGLRC hRC = NULL; // Permanent Rendering Context +// typedef from wglext.h +typedef BOOL(WINAPI * PFNWGLSWAPINTERVALEXTPROC) (int interval); +static PFNWGLSWAPINTERVALEXTPROC wglSwapIntervalEXT = NULL; + void cInterfaceWGL::SwapInterval(int Interval) { - if (WGLEW_EXT_swap_control) + if (wglSwapIntervalEXT) wglSwapIntervalEXT(Interval); else ERROR_LOG(VIDEO, "No support for SwapInterval (framerate clamped to monitor refresh rate)."); @@ -71,6 +75,7 @@ bool cInterfaceWGL::Create(void *&window_handle) Host_SysMessage("failed to create window"); return false; } + wglSwapIntervalEXT = (PFNWGLSWAPINTERVALEXTPROC)GLInterface->GetProcAddress("wglSwapIntervalEXT"); // Show the window EmuWindow::Show(); @@ -97,7 +102,7 @@ bool cInterfaceWGL::Create(void *&window_handle) 0, 0, 0 // Layer Masks Ignored }; - GLuint PixelFormat; // Holds The Results After Searching For A Match + int PixelFormat; // Holds The Results After Searching For A Match if (!(hDC=GetDC(EmuWindow::GetWnd()))) { PanicAlert("(1) Can't create an OpenGL Device context. Fail."); diff --git a/Source/Core/VideoBackends/OGL/GLExtensions/GLExtensions.cpp b/Source/Core/VideoBackends/OGL/GLExtensions/GLExtensions.cpp index 958931af71..3f2bbcc474 100644 --- a/Source/Core/VideoBackends/OGL/GLExtensions/GLExtensions.cpp +++ b/Source/Core/VideoBackends/OGL/GLExtensions/GLExtensions.cpp @@ -5,7 +5,9 @@ #include "GLExtensions.h" #include "Log.h" +#if defined(__linux__) #include +#endif #include // gl_1_2 diff --git a/Source/Core/VideoBackends/OGL/GLExtensions/gl_common.h b/Source/Core/VideoBackends/OGL/GLExtensions/gl_common.h index a027c17a24..db881e3e53 100644 --- a/Source/Core/VideoBackends/OGL/GLExtensions/gl_common.h +++ b/Source/Core/VideoBackends/OGL/GLExtensions/gl_common.h @@ -2,6 +2,9 @@ // Licensed under GPLv2 // Refer to the license.txt file included. +#include +#include + #ifndef GLAPIENTRY #define GLAPIENTRY #endif diff --git a/Source/Core/VideoBackends/OGL/OGL.vcxproj b/Source/Core/VideoBackends/OGL/OGL.vcxproj index 135c8fc469..48980e6f80 100644 --- a/Source/Core/VideoBackends/OGL/OGL.vcxproj +++ b/Source/Core/VideoBackends/OGL/OGL.vcxproj @@ -44,6 +44,7 @@ + @@ -63,6 +64,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Source/Core/VideoBackends/OGL/OGL.vcxproj.filters b/Source/Core/VideoBackends/OGL/OGL.vcxproj.filters index de6fd46a1b..ef77a32d9d 100644 --- a/Source/Core/VideoBackends/OGL/OGL.vcxproj.filters +++ b/Source/Core/VideoBackends/OGL/OGL.vcxproj.filters @@ -13,6 +13,9 @@ {696df73b-378e-4399-8f21-999b65d78dcd} + + {4366f285-ded5-48c9-9464-03fb46174526} + @@ -54,6 +57,9 @@ + + GLExtensions + @@ -94,6 +100,90 @@ + + GLExtensions + + + GLExtensions + + + GLExtensions + + + GLExtensions + + + GLExtensions + + + GLExtensions + + + GLExtensions + + + GLExtensions + + + GLExtensions + + + GLExtensions + + + GLExtensions + + + GLExtensions + + + GLExtensions + + + GLExtensions + + + GLExtensions + + + GLExtensions + + + GLExtensions + + + GLExtensions + + + GLExtensions + + + GLExtensions + + + GLExtensions + + + GLExtensions + + + GLExtensions + + + GLExtensions + + + GLExtensions + + + GLExtensions + + + GLExtensions + + + GLExtensions +