简体   繁体   中英

What is the best way to draw a glossy circle in iPhone OpenGL or Coregraphics?

I want to draw a circle on the iPhone screen with Shadow and glossy effect.I am new to coreGraphics and OpenGL and dont really know the difference between the two.And which library is to be used when.

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.

OpenGL is not a library, it's an API that gives you a "no-frills" access to the graphics system. All it provides are graphics primitives (points, lines, triangles) that it places on the screen and rasterizes them applying colour, textures through mathematical formula and/or a program called shader.

Sure, what you want to draw can be drawn using OpenGL, but it will require several intermediate steps and an artistic understanding of how that image is created from drawing operations.

So to answer your question: The most simple approach is to store this kind of, well whatever it is, as a vector graphics (SVG), and draw it using a library that provides drawing from a file.

The choice between CoreGraphics and OpenGL should be based on what your application does primiarily: Is it rendering some 3D graphics, a custom written 3D engine maybe: Use OpenGL. If you're aiming to draw some kind of UI then CoreGraphics probably is the better choice.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM