compile fix when compiling with WAIT_FOR_VSYNC = 1 (btw, is this still used ?)

This commit is contained in:
Damien Plisson 2009-11-24 10:19:07 +00:00
parent 0f280e631f
commit 78ce1fb6ca

@ -858,13 +858,16 @@ 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_openGLView setOpenGLContext:tmpOpenGLContext];
[tmpOpenGLContext setView:m_openGLView];
m_openGLContext = tmpOpenGLContext;
m_openGLContext = tmpOpenGLContext;
break;
case GHOST_kDrawingContextTypeNone: