[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [24856] trunk/blender/intern/ghost/intern/ GHOST_WindowCocoa.mm: compile fix when compiling with WAIT_FOR_VSYNC = 1 ( btw, is this still used ?)

Damien Plisson damien.plisson at yahoo.fr
Tue Nov 24 11:19:07 CET 2009


Revision: 24856
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=24856
Author:   damien78
Date:     2009-11-24 11:19:07 +0100 (Tue, 24 Nov 2009)

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

Modified Paths:
--------------
    trunk/blender/intern/ghost/intern/GHOST_WindowCocoa.mm

Modified: trunk/blender/intern/ghost/intern/GHOST_WindowCocoa.mm
===================================================================
--- trunk/blender/intern/ghost/intern/GHOST_WindowCocoa.mm	2009-11-24 09:55:41 UTC (rev 24855)
+++ trunk/blender/intern/ghost/intern/GHOST_WindowCocoa.mm	2009-11-24 10:19:07 UTC (rev 24856)
@@ -858,15 +858,18 @@
 			
 			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;





More information about the Bf-blender-cvs mailing list