Browse Source

add sync-video setting

David Rose 17 years ago
parent
commit
da154168a3
1 changed files with 4 additions and 0 deletions
  1. 4 0
      panda/src/osxdisplay/osxGraphicsStateGuardian.cxx

+ 4 - 0
panda/src/osxdisplay/osxGraphicsStateGuardian.cxx

@@ -106,6 +106,10 @@ void osxGraphicsStateGuardian::reset()
   */
 
   GLGraphicsStateGuardian::reset();
+
+  // Apply the video-sync setting.
+  GLint value = sync_video ? 1 : 0;
+  aglSetInteger(_aglcontext, AGL_SWAP_INTERVAL, &value);
  }
 
 ////////////////////////////////////////////////////////////////////