搜索stackoverflow并且Google没有返回任何结果。
[[CCSpriteFrameCache sharedSpriteFrameCache] addSpriteFramesWithFile:@"sun.plist"];
CCSprite* sprite = [CCSprite spriteWithImageNamed:@"8.jpg" ];
sprite.position = ccp(self.contentSize.width/2 + 300, self.contentSize.height/2);
[self addChild: sprite];
显示屏显示plist
中选定的精灵但如果我应用着色器程序,则精灵重叠
解决方案是什么? 没有着色器:
重叠:
THX
--- UPDT 05.05.2014
@interface gSprite : CCSprite
...
- (void) draw;
@end
- (void) draw{
....
_shaderProgram = [[CCShaderCache sharedShaderCache] programForKey:@"LightingBlurShader"];
[_shaderProgram use];
[_shaderProgram setUniformsForBuiltins];
glUniform1i([[Engine sharedEngine] lightCount], activeLighCount);
glUniform2fv([[Engine sharedEngine] lightPositionUniformLocation], activeLighCount, arrayLigthPos);
glUniform1fv([[Engine sharedEngine] lightFalloffUniformLocation],activeLighCount, arrayLightFalloff);
glUniform1fv([[Engine sharedEngine] lightIntensityUniformLocation], activeLighCount, arrayLightIntensity);
....
[super draw];
} //draw