natiny_surface_resize

C
void natiny_surface_resize(NatinySurface surface, uint32_t width, uint32_t height);

Replaces a surface's attachments with new attachments of the requested size.

Parameters

Name Type Description
surface NatinySurface Surface handle from natiny_surface_create
width uint32_t New surface width in pixels
height uint32_t New surface height in pixels

Example

C
natiny_surface_resize(surface, 1920, 1080);

Notes

  • If allocation fails, the surface is left at the size it already had and stays usable.