From 636a47a4c41334ae919ea7bdb9b25488e79d5a2a Mon Sep 17 00:00:00 2001 From: Adam Kewley Date: Thu, 4 Jul 2024 13:08:39 +0200 Subject: [PATCH] Hack in necessary fix to ensure hellotriangle renders on desktop --- apps/hellotriangle/hellotriangle.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/hellotriangle/hellotriangle.cpp b/apps/hellotriangle/hellotriangle.cpp index 73d525c9f4..41931f5bf7 100644 --- a/apps/hellotriangle/hellotriangle.cpp +++ b/apps/hellotriangle/hellotriangle.cpp @@ -89,7 +89,11 @@ void main() const auto transform = identity().with_rotation(angle_axis(Radians{seconds_since_startup}, Vec3{0.0f, 1.0f, 0.0f})); graphics::draw(mesh_, transform, material_, camera_); camera_.render_to(target_texture_); +#ifdef EMSCRIPTEN graphics::blit_to_screen(target_texture_, Rect{{}, App::get().main_window_dimensions()}, gamma_correcter_); +#else + graphics::blit_to_screen(target_texture_, Rect{{}, App::get().main_window_dimensions()}); +#endif ui::begin_panel("window"); ui::draw_float_slider("torus_radius", &edited_torus_parameters_.torus_radius, 0.0f, 5.0f);