mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-05-09 03:58:06 +03:00
Move swap control to the host specific GLInterface files.
This commit is contained in:
parent
2db0c4270e
commit
73eb98ed8e
11 changed files with 45 additions and 34 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue