Skip to content

Surfaces

Vašek edited this page Jan 18, 2019 · 2 revisions

Surface is a canvas to which draw_ functions can render. One can imagine surface as a 2D array of pixels, storing rgba values of each pixel. By default there is one predefined surface called application surface, often refered to as a backbuffer. At every frame (step) beginning, data from this surface are wiped, then in draw event new data are stored and finally the surface is rendered to the screen. At some point of development, more surfaces may be required - typically for shadows, lighting but one can create any number of amazing effects using surfaces. When a surface is no longer needed it is important to remove it from the memory using surface_free function, as it won't destroy itself.

Surface Functions

Back to Manual

Clone this wiki locally