Skip to content
Permalink
Browse files

swap_control_tear doesn't seem to work out for our timing or somethin…

…g. Let's do regular vsync.
  • Loading branch information
hrydgard committed Aug 24, 2013
1 parent ee37d51 commit 955ad2a6e444919c090c04c75f357bbd689f13e9
Showing with 5 additions and 8 deletions.
  1. +3 −1 GPU/GLES/GLES_GPU.cpp
  2. +2 −7 Windows/OpenGLBase.cpp
@@ -468,7 +468,9 @@ void GLES_GPU::BeginFrameInternal() {
if ((PSP_CoreParameter().unthrottle) || (PSP_CoreParameter().fpsLimit == 1))
desiredVSyncInterval = 0;
if (desiredVSyncInterval != lastVsync_) {
if (gl_extensions.EXT_swap_control_tear) {
// Disabled EXT_swap_control_tear for now, it never seems to settle at the correct timing
// so it just keeps tearing. Not what I hoped for...
if (false && gl_extensions.EXT_swap_control_tear) {
// See http://developer.download.nvidia.com/opengl/specs/WGL_EXT_swap_control_tear.txt
glstate.SetVSyncInterval(-desiredVSyncInterval);
} else {
@@ -19,12 +19,6 @@ static bool enableGLDebug = false;

#pragma optimize("", off)

void GL_SetVSyncInterval(int interval=1)
{
if( wglSwapIntervalEXT )
wglSwapIntervalEXT(interval);
}

void GL_Resized() {
if (!hWnd)
return;
@@ -197,7 +191,8 @@ bool GL_Init(HWND window, std::string *error_message) {

glstate.Initialize();
CheckGLExtensions();
GL_SetVSyncInterval(0);
if( wglSwapIntervalEXT )
wglSwapIntervalEXT(0);
if (enableGLDebug && glewIsSupported("GL_ARB_debug_output")) {
glDebugMessageCallbackARB((GLDEBUGPROCARB)&DebugCallbackARB, 0); // print debug output to stderr
glEnable(GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB);

0 comments on commit 955ad2a

Please sign in to comment.
You can’t perform that action at this time.