I’ve mentioned a number of great Cocos2D examples and today’s example demonstrates how to create a magnifying glass in Cocos2D.
This is relatively easy to do with UIKit, and this example source code from Rombos grabs the image data from the OpenGL Buffer, and uses UIKit to perform the magnifying effect.
As you can see from this image of the article on that the magnifying effect works extremely well:
You can download the source code and read more about the technique used on the Rombos blog here.
A nice and simple solution to what can be a challenging effect to implement. Included are the graphics so you can give it the same look as in the image.
via @purplelilgirl, @mariozullo
©2012 iPhone, iOS 5, iPad SDK Development Tutorial and Programming Tips. All Rights Reserved.
.