What I want to share today is my little hack to reflect a CCSprite used in to cocos2d. I say hack because it does feel a little dirty, i didn't go and learn about the details of Open GL and the like, simply patched things together to get a working solution.
Below is the code for my ImageReflector, the basic idea and how it got it work was simple:
The best looking reflection example I found was Apples' example. So the methods createBitmapContext, createGradientImage and reflectedImage are directly from the above example. I wanted to use it in cocos2d so I used CCRenderTexture to create a UIImage, passed that to Apples' example code and then simply converted back to a CCSprite with the help of the CCTexture2D class.
It's cool that you report such things.ReplyDelete
very informative and knowledgeableReplyDelete
Đặt vé máy bay tại Aivivu, tham khảoReplyDelete
vé máy bay đi Mỹ bao nhiêu tiền
lịch bay từ mỹ về việt nam hôm nay
khi nào có chuyến bay từ đức về việt nam
vé máy bay từ việt nam sang nga bao nhiêu
ve may bay tu anh ve viet nam
vé máy bay từ pháp về việt nam
chuyen bay chuyen gia trung quoc
Players who have sufficient eso gold can buy potions, motifs, houses, and a number of other products within the game. A safe and secure site called MMOGAH can make it easier for players to buy eso gold immediately. Far better is to official site or check out our own established site to find out related to eso gold.ReplyDelete