diff options
author | Damien Plisson <damien.plisson@yahoo.fr> | 2009-11-24 13:19:07 +0300 |
---|---|---|
committer | Damien Plisson <damien.plisson@yahoo.fr> | 2009-11-24 13:19:07 +0300 |
commit | 78ce1fb6ca80dfbdde445f1b2dc01691f4ac69ab (patch) | |
tree | 019d15aff01cc7aeaa56f467992a34765e6f8f0c /intern | |
parent | 0f280e631f48df114119f67e4c7a23cc6b120f80 (diff) |
compile fix when compiling with WAIT_FOR_VSYNC = 1 (btw, is this still used ?)
Diffstat (limited to 'intern')
-rw-r--r-- | intern/ghost/intern/GHOST_WindowCocoa.mm | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/intern/ghost/intern/GHOST_WindowCocoa.mm b/intern/ghost/intern/GHOST_WindowCocoa.mm index 24abc9c45fc..b1b23963b3d 100644 --- a/intern/ghost/intern/GHOST_WindowCocoa.mm +++ b/intern/ghost/intern/GHOST_WindowCocoa.mm @@ -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; |