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

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

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

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 06-22-2011, 07:53 AM   #1 (permalink)
Registered Member
 
Join Date: Jun 2011
Location: Mumbai,India
Posts: 2
amavi is on a distinguished road
Default Coregraphics or OpenGL?

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.
amavi is offline   Reply With Quote
Old 06-22-2011, 08:33 AM   #2 (permalink)
Cocoa Junkie
 
Duncan C's Avatar
 
Join Date: Dec 2008
Location: Northern Virginia
Posts: 6,003
Duncan C has a spectacular aura about
Default

Quote:
Originally Posted by amavi View Post
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.)
__________________
Regards,

Duncan C
WareTo

Check out our apps in the Apple App store


Check out this password generator app that shows various techniques including using a data container singleton object to share data between objects in your project.

See this tutorial on using UIView animations and layer animations:

See this thread on generating random, non-repeating text

Check out a very cool Macintosh Kaleidoscopes app called ScopeWorks that we released to the Mac App store.
Duncan C is offline   Reply With Quote
Old 06-22-2011, 09:29 AM   #3 (permalink)
Registered Member
 
Join Date: Jan 2009
Posts: 261
vbovio is on a distinguished road
Default

I also recommend you using core graphics, it is a cocoa library, plays nice with UI elements (you can draw stuff inside them), and is very easy to learn, I recommend you to get a book, it will help you to learn faster and is a good reference for future things you do.
__________________
BovioSoft Games
vbovio is offline   Reply With Quote
Reply

Bookmarks

Tags
coregraphics, iphone, opengl

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 327
8 members and 319 guests
chemistry, Dnnake, iOS.Lover, lendo, leostc, Leslie80, pbart, VinceYuan
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,664
Threads: 94,120
Posts: 402,898
Top Poster: BrianSlick (7,990)
Welcome to our newest member, Leslie80
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 02:27 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0