Skip to content

Commit ba02cb7

Browse files
committed
Added unlock/lock opengl context to CCDirectorView.
Updated OSX project to include CCNoARC and CCRenderDispatch
1 parent 55f6e09 commit ba02cb7

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

cocos2d-osx.xcodeproj/project.pbxproj

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,9 @@
169169
D216F92D1970A35A000DEF7C /* ALWeakDictionary.m in Sources */ = {isa = PBXBuildFile; fileRef = D216F9271970A35A000DEF7C /* ALWeakDictionary.m */; };
170170
D216F92E1970A35A000DEF7C /* ALWeakElement.h in Headers */ = {isa = PBXBuildFile; fileRef = D216F9281970A35A000DEF7C /* ALWeakElement.h */; };
171171
D216F92F1970A35A000DEF7C /* ALWeakElement.m in Sources */ = {isa = PBXBuildFile; fileRef = D216F9291970A35A000DEF7C /* ALWeakElement.m */; };
172+
D2342007199AD36D00DF8FCD /* CCNoARC.m in Sources */ = {isa = PBXBuildFile; fileRef = D2342004199AD36D00DF8FCD /* CCNoARC.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
173+
D2342008199AD36D00DF8FCD /* CCRenderDispatch.h in Headers */ = {isa = PBXBuildFile; fileRef = D2342005199AD36D00DF8FCD /* CCRenderDispatch.h */; };
174+
D2342009199AD36D00DF8FCD /* CCRenderDispatch.m in Sources */ = {isa = PBXBuildFile; fileRef = D2342006199AD36D00DF8FCD /* CCRenderDispatch.m */; };
172175
D2D598641987132700BDAF25 /* CCEffect_Private.h in Headers */ = {isa = PBXBuildFile; fileRef = D2D598421987132700BDAF25 /* CCEffect_Private.h */; };
173176
D2D598651987132700BDAF25 /* CCEffect.h in Headers */ = {isa = PBXBuildFile; fileRef = D2D598431987132700BDAF25 /* CCEffect.h */; };
174177
D2D598661987132700BDAF25 /* CCEffect.m in Sources */ = {isa = PBXBuildFile; fileRef = D2D598441987132700BDAF25 /* CCEffect.m */; };
@@ -540,6 +543,9 @@
540543
D216F9271970A35A000DEF7C /* ALWeakDictionary.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ALWeakDictionary.m; sourceTree = "<group>"; };
541544
D216F9281970A35A000DEF7C /* ALWeakElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ALWeakElement.h; sourceTree = "<group>"; };
542545
D216F9291970A35A000DEF7C /* ALWeakElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ALWeakElement.m; sourceTree = "<group>"; };
546+
D2342004199AD36D00DF8FCD /* CCNoARC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CCNoARC.m; sourceTree = "<group>"; };
547+
D2342005199AD36D00DF8FCD /* CCRenderDispatch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCRenderDispatch.h; sourceTree = "<group>"; };
548+
D2342006199AD36D00DF8FCD /* CCRenderDispatch.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CCRenderDispatch.m; sourceTree = "<group>"; };
543549
D2D598421987132700BDAF25 /* CCEffect_Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCEffect_Private.h; sourceTree = "<group>"; };
544550
D2D598431987132700BDAF25 /* CCEffect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCEffect.h; sourceTree = "<group>"; };
545551
D2D598441987132700BDAF25 /* CCEffect.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CCEffect.m; sourceTree = "<group>"; };
@@ -1342,6 +1348,9 @@
13421348
D3AD531F18C84FC9005B6CF3 /* CCRenderer_private.h */,
13431349
D3AD532018C84FC9005B6CF3 /* CCRenderer.h */,
13441350
D3AD532118C84FC9005B6CF3 /* CCRenderer.m */,
1351+
D2342004199AD36D00DF8FCD /* CCNoARC.m */,
1352+
D2342005199AD36D00DF8FCD /* CCRenderDispatch.h */,
1353+
D2342006199AD36D00DF8FCD /* CCRenderDispatch.m */,
13451354
);
13461355
path = cocos2d;
13471356
sourceTree = "<group>";
@@ -1748,6 +1757,7 @@
17481757
B7E2603517E7C774007067F0 /* NSEvent+CC.h in Headers */,
17491758
B77060961831B0C40043CC67 /* OALAudioFile.h in Headers */,
17501759
B7E2603917E7C786007067F0 /* UITouch+CC.h in Headers */,
1760+
D2342008199AD36D00DF8FCD /* CCRenderDispatch.h in Headers */,
17511761
D2D5987E1987132700BDAF25 /* CCEffectSaturation.h in Headers */,
17521762
);
17531763
runOnlyForDeploymentPostprocessing = 0;
@@ -1870,6 +1880,7 @@
18701880
E076E6DA1225EC7400DE0DA2 /* CCActionInstant.m in Sources */,
18711881
E076E6DC1225EC7400DE0DA2 /* CCActionInterval.m in Sources */,
18721882
B77060901831B0C40043CC67 /* mach_timing.c in Sources */,
1883+
D2342009199AD36D00DF8FCD /* CCRenderDispatch.m in Sources */,
18731884
E076E6DE1225EC7400DE0DA2 /* CCActionManager.m in Sources */,
18741885
B791E851182065BD00DAE1D7 /* CCTiledMapLayer.m in Sources */,
18751886
E076E6E21225EC7400DE0DA2 /* CCActionProgressTimer.m in Sources */,
@@ -1897,6 +1908,7 @@
18971908
B770606C1831B0C40043CC67 /* OALAudioTrackNotifications.m in Sources */,
18981909
E076E7161225EC7400DE0DA2 /* CCProgressNode.m in Sources */,
18991910
D2D598851987132700BDAF25 /* CCEffectUtils.m in Sources */,
1911+
D2342007199AD36D00DF8FCD /* CCNoARC.m in Sources */,
19001912
B77060831831B0C40043CC67 /* ALSource.m in Sources */,
19011913
E076E7191225EC7400DE0DA2 /* CCRenderTexture.m in Sources */,
19021914
E076E71D1225EC7400DE0DA2 /* CCScene.m in Sources */,

cocos2d/Platforms/CCDirectorView.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,10 @@
3535
/// The block may not be invoked from the main thread.
3636
-(void)addFrameCompletionHandler:(dispatch_block_t)handler;
3737

38+
/** uses and locks the OpenGL context */
39+
-(void) lockOpenGLContext;
40+
41+
/** unlocks the openGL context */
42+
-(void) unlockOpenGLContext;
43+
3844
@end

0 commit comments

Comments
 (0)