fix windows build

add the GL include (back) to Base.props
use a similar technique to GLX.cpp (by Sonic) in WGL.cpp to get
wglSwapIntervalEXT without the WGLEW check

Conflicts:
	Source/Core/VideoBackends/OGL/OGL.vcxproj
	Source/Core/VideoBackends/OGL/OGL.vcxproj.filters
	Source/VSProps/Base.props
This commit is contained in:
Jack Frost
2013-12-31 00:03:49 +01:00
committed by degasus
parent 10bd61a9d2
commit f4bd7bdef0
5 changed files with 131 additions and 2 deletions

View File

@ -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.");