42c14fae59
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1.5 KiB
1.5 KiB
name, kind, lang, domain, version, purity, signature, description, tags, uses_functions, uses_types, returns, returns_optional, error_type, imports, example, tested, tests, test_file_path, file_path, params, output
| name | kind | lang | domain | version | purity | signature | description | tags | uses_functions | uses_types | returns | returns_optional | error_type | imports | example | tested | tests | test_file_path | file_path | params | output | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| sokol_setup | function | cpp | gfx | 0.1.0 | pure | make_environment() -> sg_environment; make_swapchain(int w, int h) -> sg_swapchain | Builders puros para inicializar sokol_gfx encima de un GL context creado por SDL3 (no por sokol_app). Construye sg_environment con defaults RGBA8 + depth/stencil y sg_swapchain con el default framebuffer del contexto activo. Issue 0072b — base del runtime gamedev en PC + WASM. |
|
false | // tras SDL_GL_CreateContext(): sg_desc d{}; d.environment = fn::gfx::make_environment(); d.logger.func = slog_func; sg_setup(&d); // por frame: sg_pass p{}; p.swapchain = fn::gfx::make_swapchain(w, h); sg_begin_pass(&p); | false | cpp/functions/gfx/sokol_setup.cpp |
|
Estructuras sg_environment / sg_swapchain listas para sokol_gfx. |
sokol_setup
Helpers minimos para usar sokol_gfx con SDL3 sin depender de sokol_glue.h (que importa simbolos de sokol_app y rompe en stacks SDL3-driven).
Definidos como funciones puras: solo construyen structs, no tocan estado global. Llamadas tipicas en engine_smoke (issue 0072a) y runtime_test (0072b).