Quote:
Originally Posted by amavi
I am new to coreGraphics and OpenGL and dont really know the difference between the two.And which library is to be used when.
I want to draw a circle on the iPhone screen with Shadow and glossy effect.
How can I draw following image in iPhone? any reference point to learn the appropriate library would be great.
have 3 of those images [1] [2] [3] and a slider to control the glow.when you slide to change the glow it should go across all these, and furthermore some levels could have upto 50 circles.
|
Core Graphics is a Cocoa graphics library. It's fairly low-level, but you can do CG drawing inside Cocoa views.
OpenGL is a platform-indipendent graphics API. In Cocoa, you have to create a separate OpenGL view in order to do OpenGL drawing, and you can't easily overlap OpenGL and Cocoa drawing. OpenGL is a very different beast. It's powerful, but doesn't really "play nicely" with Cocoa drawing. Games that use OpenGL typically take over the screen and do everything in OpenGL. There is a pretty big learning curve in starting out with OpenGL.
If all you want to do is draw glossy circles, Core Graphics is probably the best bet. (It sounds like you need radial gradients.)