#pragma once #include "core/orbit_camera.h" #include "gfx/mesh_gpu.h" #include "imgui.h" namespace fn::viz { struct MeshViewerConfig { const fn::gfx::MeshGpu* mesh = nullptr; fn::core::OrbitCamera* cam = nullptr; // mutable: drag/wheel handler ImVec2 size = {-1.0f, 400.0f}; // -1 = stretch X ImU32 color = IM_COL32(180, 180, 200, 255); bool wireframe = false; }; // Renderiza un MeshGpu en un FBO interno (cacheado por id) y muestra // la textura via ImGui::Image. Maneja drag/wheel sobre el panel. // // El `id` debe ser estable para reusar el mismo FBO entre frames. void mesh_viewer(const char* id, const MeshViewerConfig& cfg); } // namespace fn::viz