4b2bb6998a
Añade soporte C++ al registry: vendor submodules (glfw, imgui, implot, tracy), sistema de build con CMake y toolchains cross-platform, runner C++ en fn CLI, parser de tests Google Test, y funciones bash para build Linux/Windows. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
26 lines
576 B
C++
26 lines
576 B
C++
#pragma once
|
|
|
|
#include <functional>
|
|
|
|
namespace fn {
|
|
|
|
struct AppConfig {
|
|
const char* title = "fn_registry";
|
|
int width = 1280;
|
|
int height = 720;
|
|
bool vsync = true;
|
|
float bg_r = 0.1f;
|
|
float bg_g = 0.1f;
|
|
float bg_b = 0.1f;
|
|
};
|
|
|
|
// Run an ImGui application. The render_fn is called every frame
|
|
// between ImGui::NewFrame() and ImGui::Render().
|
|
// Returns 0 on clean exit, 1 on error.
|
|
int run_app(AppConfig config, std::function<void()> render_fn);
|
|
|
|
// Convenience: run with default config
|
|
int run_app(std::function<void()> render_fn);
|
|
|
|
} // namespace fn
|