compile fix when compiling with WAIT_FOR_VSYNC = 1 (btw, is this still used ?)
authorDamien Plisson <damien.plisson@yahoo.fr>
Tue, 24 Nov 2009 10:19:07 +0000 (10:19 +0000)
committerDamien Plisson <damien.plisson@yahoo.fr>
Tue, 24 Nov 2009 10:19:07 +0000 (10:19 +0000)
intern/ghost/intern/GHOST_WindowCocoa.mm

index 24abc9c45fc28276b405851c39dd9ff1976603f7..b1b23963b3d72594b0e3fc11bf1d56b8adbce7a4 100644 (file)
@@ -858,15 +858,18 @@ GHOST_TSuccess GHOST_WindowCocoa::installDrawingContext(GHOST_TDrawingContextTyp
                        
                        if (!s_firstOpenGLcontext) s_firstOpenGLcontext = tmpOpenGLContext;
 #ifdef WAIT_FOR_VSYNC
+                       {
+                               GLint swapInt = 1;
                                /* wait for vsync, to avoid tearing artifacts */
-                               [tmpOpenGLContext setValues:1 forParameter:NSOpenGLCPSwapInterval];
+                               [tmpOpenGLContext setValues:&swapInt forParameter:NSOpenGLCPSwapInterval];
+                       }
 #endif
-                               [m_openGLView setOpenGLContext:tmpOpenGLContext];
-                               [tmpOpenGLContext setView:m_openGLView];
-                               
-                               m_openGLContext = tmpOpenGLContext;
+                       [m_openGLView setOpenGLContext:tmpOpenGLContext];
+                       [tmpOpenGLContext setView:m_openGLView];
+                       
+                       m_openGLContext = tmpOpenGLContext;
                        break;
-               
+       
                case GHOST_kDrawingContextTypeNone:
                        success = GHOST_kSuccess;
                        break;