Skip to content

Commit 7fc4ffd

Browse files
author
Thayer J Andrews
committed
CCEffectRenderer - Fix bug introduced by removal of pushGroup / popGroup
Scott pointed out that this change had broken the blur effects so I'm rolling it back.
1 parent 77d8811 commit 7fc4ffd

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

cocos2d/CCEffectRenderer.m

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,6 @@
1919

2020
#if CC_ENABLE_EXPERIMENTAL_EFFECTS
2121

22-
#define CCEFFECT_DEBUG_PASSES 0
23-
#if CCEFFECT_DEBUG_PASSES
24-
#define CCEFFECT_DEBUG_PUSH_GROUP(R) [(R) pushGroup]
25-
#define CCEFFECT_DEBUG_POP_GROUP(R, L) [(R) popGroupWithDebugLabel:(L) globalSortOrder:0]
26-
#else
27-
#define CCEFFECT_DEBUG_PUSH_GROUP(R)
28-
#define CCEFFECT_DEBUG_POP_GROUP(R, L)
29-
#endif
30-
31-
3222
@interface CCEffectRenderTarget : NSObject
3323

3424
@property (nonatomic, readonly) CCTexture *texture;
@@ -172,7 +162,7 @@ -(void)drawSprite:(CCSprite *)sprite withEffect:(CCEffect *)effect uniforms:(NSM
172162

173163
CCEffectRenderTarget *rt = nil;
174164

175-
CCEFFECT_DEBUG_PUSH_GROUP(renderer);
165+
[renderer pushGroup];
176166
if (directRendering)
177167
{
178168
renderPass.transform = *transform;
@@ -194,7 +184,7 @@ -(void)drawSprite:(CCSprite *)sprite withEffect:(CCEffect *)effect uniforms:(NSM
194184
[self restoreRenderTargetWithRenderer:renderer];
195185
[renderPass end];
196186
}
197-
CCEFFECT_DEBUG_POP_GROUP(renderer, renderPass.debugLabel);
187+
[renderer popGroupWithDebugLabel:renderPass.debugLabel globalSortOrder:0];
198188

199189
previousPassRT = rt;
200190
}

0 commit comments

Comments
 (0)