From aabbeac3d9e2ac0f293ab43fec71e56091c823e8 Mon Sep 17 00:00:00 2001 From: hachem Date: Tue, 18 Aug 2026 15:00:34 +0200 Subject: fix: macOS compatibility --- src/engine/engine.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/engine/engine.h') diff --git a/src/engine/engine.h b/src/engine/engine.h index 88e0058..0a50612 100644 --- a/src/engine/engine.h +++ b/src/engine/engine.h @@ -89,7 +89,13 @@ namespace Donut void set_target_fps(int fps) { m_target_fps = fps; } int get_target_fps() const { return m_target_fps; } float get_current_fps() const { return m_current_fps; } - void set_compute_height(int height) { m_compute_height = height; } + void set_compute_height(int height) + { +#ifdef __APPLE__ + if (height > 256) height = 256; +#endif + m_compute_height = height; + } int get_compute_height() const { return m_compute_height; } int get_compute_width() const { return (m_width * m_compute_height) / m_height; } void update_compute_dimensions(); @@ -125,6 +131,8 @@ namespace Donut private: Ref create_compute_program(const char* path); std::pair, Ref> quad_vao(); + + void draw_geodesic_pass(int cw, int ch); private: Ref m_quad_vao; Ref m_texture; @@ -137,6 +145,8 @@ namespace Donut Ref m_objects_ubo; Ref m_simulation_ubo; + uint32_t m_geodesic_fbo = 0; + int m_width; int m_height; float m_width_f = 100.0f*1e10f; -- cgit v1.3