3.0 KiB
3.0 KiB
name, lang, domain, description, tags, uses_functions, uses_types, framework, entry_point, dir_path, repo_url, e2e_checks
| name | lang | domain | description | tags | uses_functions | uses_types | framework | entry_point | dir_path | repo_url | e2e_checks | ||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| engine_smoke | cpp | gamedev | Smoke test del stack gamedev: SDL3 + sokol_gfx + Dear ImGui. Valida que el stack compila y corre en PC (Linux/Windows desktop GL) y WASM (WebGL2 via emscripten) antes de invertir tiempo en runtime real (issue 0072a). |
|
imgui | main.cpp | cpp/apps/engine_smoke |
|
engine_smoke
Primer experimento del stack gamedev (issue 0072a).
Que hace
- Abre ventana SDL3 1280x720 con context OpenGL.
- Inicializa
sokol_gfxsobre ese context (GL 3.3 desktop, GLES3 en WASM). - Pinta un fullscreen triangle con un fragment shader animado (gradient time-based).
- Pinta sobre eso un panel ImGui con FPS, tamaño de ventana y boton Quit.
Sin fn_framework, sin add_imgui_app(). CMakeLists standalone para evitar contaminar el shell desktop hasta validar el stack.
Build PC (Linux)
Desde la raiz del fn_registry:
cmake -S cpp -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build --target engine_smoke -j
./build/cpp/apps/engine_smoke/engine_smoke
Build WASM
Requiere emsdk instalado y activado en el shell. Ver cpp/vendor/sokol.VENDORING.md y bash/functions/pipelines/build_wasm_cpp_app.sh.
bash bash/functions/pipelines/build_wasm_cpp_app.sh engine_smoke
# Sirve build/wasm/engine_smoke/engine_smoke.html en navegador
Budget objetivo: gzip ≤ 1.5 MB.
Stack vendoreado
cpp/vendor/sdl3/— SDL3 release-3.4.8cpp/vendor/sokol/— sokol_gfx single-header pinned commitcpp/vendor/imgui/— ImGui 1.92.7 con backendsimgui_impl_sdl3+imgui_impl_opengl3
Notas de implementacion
- Fullscreen tri via
gl_VertexID(3 vertices, no VBO). Cubre todo el viewport sin atributos. - Uniform
u_timeactualizado por frame. - Backend ImGui =
imgui_impl_opengl3(oficial, 0 LoC custom). Compatible WebGL2 emscripten. SOKOL_GLCOREdesktop /SOKOL_GLES3web — selccion compile-time.setup_gfxse llama UNA VEZ tras crear el GL context.sg_setuptomasglue_environment()que lee el contexto activo.
No-objetivos (smoke)
- No texturas reales (eso entra en 0072b).
- No audio.
- No input game-style.
- No fn_framework integration.
- No mobile (Android/iOS son issues 0072g/h).