What is different between CoreGraphics and CoreAnimation?
Asked Answered
S

2

5

I am developing iphone game using coregraphics. but the speed is very slow. I could not play my game.. So, I googled a lot.. During the googling, I found the belows.

CoreGraphics, CoreAnimation, OpenGL ES, CALayer, Quartz 2D

I am so confused between them. Someone told me coregraphics is not using GPU. Some told me it is using GPU. coregraphics is best or openGL is best, calayer is better. ^^;;;; What is different between them and which one is using GPU?? Which one is the best to make a game. I have many image to draw.

Please let me know..... Thanks in advance.

Sophi answered 8/12, 2010 at 22:14 Comment(0)
M
8

The iOS graphics APIs are layered. Even though some portion of the final render might go thru the GPU, most of the CoreGraphics drawing functions do not.

CoreAnimation does use the GPU, but the types of graphics operations within its API (transforms of existing image data mostly) is limited.

OpenGL ES uses the GPU, but (re)compiling any changes to the rendering pipeline is reported to be quite CPU intensive.

And anything that uploads new bitmaps, images or textures to the display pipeline appears to be both CPU and GPU intensive.

Mann answered 8/12, 2010 at 22:31 Comment(0)
B
0

If you are writing a game, you may wish to look at SpriteKit if 2D and metal if 3D. Core graphics is for rendering high quality still content, but wasn’t intended as a game interface with massive FPS, unless your game resembles common app UI more than the typical game.

Bicycle answered 5/12, 2021 at 6:5 Comment(2)
I think you are confusing graphics engines with GPU graphics APIs. SpriteKit is Apple’s 2D graphics engine and SceneKit is Apple’s 3D graphics engine. Both use Metal, a shader language/graphics API used to program routines that can be run directly on the GPU.Bookcraft
As a at-one-time author of Core Graphics for a number of years, I can confidently say that I am not confusing CG with a GPU graphics API. The original question however is clearly confused about the role of these frameworks, as it says, and in fact tried to develop an iPhone game with CG. I feel my answer has been singled out for unwarranted abuse here, with a healthy does of mansplaining for good measure.Bicycle

© 2022 - 2024 — McMap. All rights reserved.