summaryrefslogtreecommitdiff
path: root/Source/Plugins/Plugin_VideoSoftware/Src/SWmain.cpp
diff options
context:
space:
mode:
authorRyan Houdek <Sonicadvance1@gmail.com>2013-01-24 10:31:08 -0600
committerRyan Houdek <Sonicadvance1@gmail.com>2013-01-24 10:31:08 -0600
commit73eb98ed8e85e2c3fdeca440e7aed50117bac8f8 (patch)
treea1c2760be2e77082df487ad7456ab8c61a541b68 /Source/Plugins/Plugin_VideoSoftware/Src/SWmain.cpp
parent2db0c4270eda2e652bb39e394aa8a576785a2354 (diff)
Move swap control to the host specific GLInterface files.
Diffstat (limited to 'Source/Plugins/Plugin_VideoSoftware/Src/SWmain.cpp')
-rw-r--r--Source/Plugins/Plugin_VideoSoftware/Src/SWmain.cpp20
1 files changed, 4 insertions, 16 deletions
diff --git a/Source/Plugins/Plugin_VideoSoftware/Src/SWmain.cpp b/Source/Plugins/Plugin_VideoSoftware/Src/SWmain.cpp
index 4c88a89ab6..332e83d0e8 100644
--- a/Source/Plugins/Plugin_VideoSoftware/Src/SWmain.cpp
+++ b/Source/Plugins/Plugin_VideoSoftware/Src/SWmain.cpp
@@ -141,28 +141,16 @@ void VideoSoftware::Shutdown()
void VideoSoftware::Video_Prepare()
{
GLInterface->MakeCurrent();
- // Init extension support.
- {
+ // Init extension support.
+ // Required for WGL SwapInterval
#ifndef USE_GLES
if (glewInit() != GLEW_OK) {
ERROR_LOG(VIDEO, "glewInit() failed!Does your video card support OpenGL 2.x?");
return;
}
-
- // Handle VSync on/off
-#ifdef _WIN32
- if (WGLEW_EXT_swap_control)
- wglSwapIntervalEXT(VSYNC_ENABLED);
- else
- ERROR_LOG(VIDEO, "no support for SwapInterval (framerate clamped to monitor refresh rate)Does your video card support OpenGL 2.x?");
-#elif defined(HAVE_X11) && HAVE_X11
- if (glXSwapIntervalSGI)
- glXSwapIntervalSGI(VSYNC_ENABLED);
- else
- ERROR_LOG(VIDEO, "no support for SwapInterval (framerate clamped to monitor refresh rate)");
-#endif
#endif
- }
+ // Handle VSync on/off
+ GLInterface->SwapInterval(VSYNC_ENABLED);
HwRasterizer::Prepare();
SWRenderer::Prepare();