Quote:
Originally Posted by ob1
I am totally new at OpenGL (and Cocos2D for that matter) and I have a little problem with my game.
One of the sprite that the gfx guy gave me needs the equivalent of the Photoshop "screen" blending. I read on forums that you can have the equivalent in OpenGl by changing the parameters of glBlendFunc.
Now, if I change the blend values in ccMacros, this sprite is perfect, but of course others are totally off. So my question is, how do I set the blendFunc for just one sprite ?
Thanks.
|
I don't fully understand what you are saying, but that may be because by changing those values, you are changing the blend values for every sprite that is created in Cocos2D. Try to find a way to change the blend values when your sprite is drawn and restore them after it is displayed.
Or, you can use custom OpenGL code to draw your texture, by overriding the -draw method of the CocosNode class. Cocos2D will render everything that doesn't belong to the -draw function as it should.