-
-
Notifications
You must be signed in to change notification settings - Fork 18
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_create
- surface_resize
- surface_set_target
- surface_reset_target
- surface_get_height
- surface_get_width
- surface_get_pixel
- surface_get_pixels
- surface_free
- surface_save
- surface_save_ext
Back to Manual