Iprof module

draw

procedureSource

Draws the report as an overlay with its top left corner at x, y, using the callbacks in config. Call it every frame after update.

Example↗
#import "Math";
#import "Iprof"(IMPORT_MODE = .CLIENT, MANUAL_MODE = true, DO_HISTORY = true);

config: Config;
config.draw_text = (x: float, y: float, text: string, color: Vector4) { /* draw with your renderer */ };
config.text_width = (text: string) -> float { return 8.0 * text.count; };
config.draw_rectangle = (x0: float, y0: float, x1: float, y1: float, color: Vector4) { /* ... */ };

update(true);
draw(10, 10, 400, 300, *config);

This one is only checked to compile, not run.

draw :: (
    x: float,
    y: float,
    full_width: float,
    requested_height: float,
    config: *Config
)

Parameters

x: float
y: float
full_width: float
requested_height: float
config: *Config

See also