you hear a lot about the advantages of OpenGL using the graphics processor directly and that that is the main advantage of using this technology over UIKit for example. But, if it’s so much better to do it this way, why does UIKit not do it also?
you hear a lot about the advantages of OpenGL using the graphics processor directly
Share
To add a few more comments to what Steven wrote:
Every drawing on OS X and iOS is eventually done by Open GL. But there are ways drawing of a line can be done:
one is to render a line into a rasterized image by CPU, and then send the resulting rasterized image to the GPU to show it.
Another is to send the drawing command to the GPU so that the GPU draws it to a rasterized image.
Then, blending, animation etc work on the resulting rasterized image in the GPU.
If you use Open GL manually, 2. is what you usually do. I’m not sure which way UIKit drawing like
UIBezierPathtakes, but the OS X counterpart, AppKit, uses the method 1 unless you opt-in, which is called Quartz GL (which was called Quartz 2d extreme in the past):But Quartz GL is not turned on by default, due to various technical reasons, which are detailed in the (always fantastic) Ars Technica articles by John Siracusa. See the discussions here for 10.4 and another for 10.5.
Here is one official documentation on Quartz GL.