Simp module

set_render_target

procedure2 overloadsSource

Chooses where drawing goes, and what the coordinates mean. Anything drawn so far is flushed first.

Example
#import "Window_Creation";

window := create_window(800, 600, "simp");
set_render_target(window, .LEFT_HANDED);

This one is only checked to compile, not run.

set_render_target :: (
    window: Window_Type,
    coords := Simp_Coordinate_System.RIGHT_HANDED
)

Chooses where drawing goes, and what the coordinates mean. Anything drawn so far is flushed first.

Parameters

window: Window_Type
the window to draw into from now on.
coords := Simp_Coordinate_System.RIGHT_HANDED
.RIGHT_HANDED (the default) puts the origin at the bottom left with y growing up; .LEFT_HANDED puts it at the top left with y growing down.
Example
#import "Window_Creation";

window := create_window(800, 600, "simp");
set_render_target(window, .LEFT_HANDED);

This one is only checked to compile, not run.

set_render_target :: (
    texture: *Texture,
    coords := Simp_Coordinate_System.RIGHT_HANDED
)

Draws into texture from now on. Anything drawn so far is flushed first.

Parameters

texture: *Texture
a texture made with texture_create_render_target.
coords := Simp_Coordinate_System.RIGHT_HANDED
.RIGHT_HANDED (the default) puts the origin at the bottom left with y growing up; .LEFT_HANDED puts it at the top left with y growing down.
Example
target := texture_create_render_target(256, 256, .RGBA8);
set_render_target(*target);
clear_render_target(0, 0, 0, 0);

This one is only checked to compile, not run.

See also