Why does OpenGL provide better performance when creating graphics applications? How does Canvas work and how does its graphics rendering method differ from OpenGL? Those. due to what lower productivity?

    1 answer 1

    It has always been that in Windows that in android. OpenGL communicates directly with the video driver and uses the output buffer. Those. At the beginning you draw the picture bit by bit, but nothing changes on the screen, it all happens in the memory of the video card (very quickly). Then when your frame is ready, you give the command to display the buffer, and in the video memory the buffers are replaced (swap - the displayed buffer is replaced by the drawn one) and you immediately see the finished drawn image. Canvas, on the other hand, uses system tools and displays every pixel on the screen (which is time consuming). Basically performance gains are buffers.

    • using buffers and plus a lot of video card cores capable of doing the same type of operation much faster than the processor - ampawd
    • "System tools" - mean, the central processor? That is, Canvas does not use the capabilities of the video card? Or uses, but not 100%?) - PashaKrizskiy
    • Canvas does not communicate with the video card directly, as OpenGL does, the canvas uses the system as an intermediary, well, as if the pixel says that the pixel is lit up in this color, this way, and it is not the only one, there is still a form, buttons, menu items, everyone wants redraw. - Vetos Kzier