diff mbox

[Branch,~glmark2-dev/glmark2/trunk] Rev 80: gl: Ensure our screen updates are not synchronized with the vertical retrace.

Message ID 20110721123635.17019.12408.launchpad@loganberry.canonical.com
State Accepted
Headers show

Commit Message

alexandros.frantzis@linaro.org July 21, 2011, 12:36 p.m. UTC
------------------------------------------------------------
revno: 80
committer: Alexandros Frantzis <alexandros.frantzis@linaro.org>
timestamp: Tue 2011-04-26 15:10:35 +0300
message:
  gl: Ensure our screen updates are not synchronized with the vertical retrace.
modified:
  src/screen-sdl.cpp


--
lp:glmark2
https://code.launchpad.net/~glmark2-dev/glmark2/trunk

You are subscribed to branch lp:glmark2.
To unsubscribe from this branch go to https://code.launchpad.net/~glmark2-dev/glmark2/trunk/+edit-subscription
diff mbox

Patch

=== modified file 'src/screen-sdl.cpp'
--- src/screen-sdl.cpp	2011-01-25 15:00:12 +0000
+++ src/screen-sdl.cpp	2011-04-26 12:10:35 +0000
@@ -44,11 +44,14 @@ 
 
     mInfo = SDL_GetVideoInfo();
 
-    SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 5);
-    SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 5);
-    SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 5);
-    SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 16);
-    SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
+    if (pFlags & SDL_OPENGL) {
+        SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 5);
+        SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 5);
+        SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 5);
+        SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 16);
+        SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
+        SDL_GL_SetAttribute(SDL_GL_SWAP_CONTROL, 0);
+    }
 
     if(SDL_SetVideoMode(mWidth, mHeight, mBpp, pFlags) == 0)
     {