I have just started with Cocos2d 3.0 after using 1.1 for a long time. I wanted to test the shaders out and looked up some tutorials. All tutorials seems to use the CCSprite property "shaderProgram". When I try it like this:
renderTexture.sprite.shaderProgram = [[CCGLProgram alloc] initWithVertexShaderByteArray:ccPositionTextureA8Color_vert fragmentShaderByteArray:ccPositionTextureColorAlphaTest_frag]
Xcode gives me an error saying: "Property 'shaderProgram' not found on object type CCSprite *"
Is this property removed or changed from version 2.0 to 3.0 and how would I go about using it in Cocos2d 3.0?
Thanks!
Adding this import:
#import "CCNode_Private.h"
allows you to access CCNode's shaderProgram
memberc
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With