UI module

create_window_renderer

procedureextensionexperimentalsince 0.31.0Source

Create a renderer drawing into window's surface. Returns null if no GPU or surface is available.

Example↗
#import "Window_Creation";

window := create_window(800, 600, "ui");
renderer := create_window_renderer(window, 800, 600);

This one is only checked to compile, not run.

create_window_renderer :: (
    window: Window_Type,
    width: int,
    height: int
) -> *Renderer

Create a renderer drawing into window's surface. Returns null if no GPU or surface is available.

Parameters

window: Window_Type
the window to draw into.
width: int
the drawable width in pixels.
height: int
the drawable height in pixels.

Returns

Example↗
#import "Window_Creation";

window := create_window(800, 600, "ui");
renderer := create_window_renderer(window, 800, 600);

This one is only checked to compile, not run.

See also