sokol/debugtext

sokol_debugtext

Types

8

Allocator

Allocator :: struct { alloc_fn: proc(a0: c.size_t, a1: rawptr) -> (rawptr), a0: c.size_t, size_t: rawptr, a1: rawptr, free_fn: proc(a0: rawptr, a1: rawptr), a0: rawptr, a1: rawptr, user_data: rawptr, }Source

sdtx_allocator_t

Used in sdtx_desc_t to provide custom memory-alloc and -free functions to sokol_debugtext.h. If memory management should be overridden, both the alloc_fn and free_fn function must be provided (e.g. it's not valid to override one function but not the other).

Context_Desc

Context_Desc :: struct { max_commands: c.int, char_buf_size: c.int, canvas_width: f32, canvas_height: f32, tab_width: c.int, color_format: sg.Pixel_Format, depth_format: sg.Pixel_Format, sample_count: c.int, }Source

sdtx_context_desc_t

Describes the initialization parameters of a rendering context. Creating additional rendering contexts is useful if you want to render in different sokol-gfx rendering passes, or when rendering several layers of text.

Desc

Desc :: struct { context_pool_size: c.int, printf_buf_size: c.int, fonts: [8]Font_Desc, ctx: Context_Desc, allocator: Allocator, logger: Logger, }Source

sdtx_desc_t

Describes the sokol-debugtext API initialization parameters. Passed to the sdtx_setup() function.

NOTE: to populate the fonts item array with builtin fonts, use any of the following functions:

sdtx_font_kc853() sdtx_font_kc854() sdtx_font_z1013() sdtx_font_cpc() sdtx_font_c64() sdtx_font_oric()

Log_Item

Log_Item :: enum i32 { OK = 0, MALLOC_FAILED = 1, ADD_COMMIT_LISTENER_FAILED = 2, COMMAND_BUFFER_FULL = 3, CONTEXT_POOL_EXHAUSTED = 4, CANNOT_DESTROY_DEFAULT_CONTEXT = 5, }Source

Range

Range :: struct { ptr: rawptr, size: c.size_t, }Source

sdtx_range is a pointer-size-pair struct used to pass memory blobs into sokol-debugtext. When initialized from a value type (array or struct), use the SDTX_RANGE() macro to build an sdtx_range struct.

Constants

4

Procedures

1

Reference search

Find anything

Documentation preferences

Settings

System theme variants

Used only while Theme is set to System.