sokol/gl

sokol_gl

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

sgl_allocator_t

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

Context_Desc

Context_Desc :: struct { max_vertices: c.int, max_commands: c.int, color_format: sg.Pixel_Format, depth_format: sg.Pixel_Format, sample_count: c.int, }Source

sgl_context_desc_t

Describes the initialization parameters of a rendering context. Creating additional contexts is useful if you want to render in separate sokol-gfx passes.

Error

Error :: struct { any: bool, vertices_full: bool, uniforms_full: bool, commands_full: bool, stack_overflow: bool, stack_underflow: bool, no_context: bool, }Source

sgl_error_t

Errors are reset each frame after calling sgl_draw(), get the last error code with sgl_error()

Log_Item

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

Constants

4

Reference search

Find anything

Documentation preferences

Settings

System theme variants

Used only while Theme is set to System.