Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 05-28-2009, 02:12 PM   #2 (permalink)
Soulstorm
Registered Member
 
Join Date: Jan 2009
Location: Menidi, Athens, Greece
Age: 25
Posts: 102
Default

Quote:
Originally Posted by ob1 View Post
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.
__________________
Visit me at Oramind Projects
Soulstorm is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 158,838
Threads: 89,210
Posts: 380,647
Top Poster: BrianSlick (7,129)
Welcome to our newest member, hariky007
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 04:02 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.