What is different between CoreGraphics and CoreAnimation?

江枫思渺然 提交于 2019-12-05 00:13:20

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/4392918/what-is-different-between-coregraphics-and-coreanimation

工具导航Map

JSON相关