hachem.wtf
aboutsummaryrefslogtreecommitdiff
path: root/src/engine/engine.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/engine.h')
-rw-r--r--src/engine/engine.h12
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;