Skip to content

surface_create

Vašek edited this page Jan 16, 2019 · 3 revisions

surface_create

Creates a surface

Syntax:

surface_create(w, h)
Argument Description
int x The width of the surface
int n The height of the surface

Returns: RenderTarget2D

Description:

This function creates a surface and will return the index of the surface which should be stored in a variable for future function calls.

Example:

RenderTarget2D surf = surface_create(1024, 1024);

This code will create a new surface that is 1024 pixels wide and 1024 pixels high and assign the index variable surf.

Back to surfaces

Clone this wiki locally