diff options
| author | hachem <im@hachem.wtf> | 2026-08-18 15:00:34 +0200 |
|---|---|---|
| committer | hachem <im@hachem.wtf> | 2026-08-18 15:00:34 +0200 |
| commit | aabbeac3d9e2ac0f293ab43fec71e56091c823e8 (patch) | |
| tree | 4d986035f451e8511024076b2c94362dbf549712 /src/engine/engine.h | |
| parent | ecb6705c7fc4fb085184712567d0e936ea5d0d1f (diff) | |
fix: macOS compatibility
Diffstat (limited to 'src/engine/engine.h')
| -rw-r--r-- | src/engine/engine.h | 12 |
1 files changed, 11 insertions, 1 deletions
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<Shader> create_compute_program(const char* path); std::pair<Ref<VertexArray>, Ref<Texture2D>> quad_vao(); + + void draw_geodesic_pass(int cw, int ch); private: Ref<VertexArray> m_quad_vao; Ref<Texture2D> m_texture; @@ -137,6 +145,8 @@ namespace Donut Ref<UniformBuffer> m_objects_ubo; Ref<UniformBuffer> m_simulation_ubo; + uint32_t m_geodesic_fbo = 0; + int m_width; int m_height; float m_width_f = 100.0f*1e10f; |
