Skip to content

Commit

Permalink
Hack in necessary fix to ensure hellotriangle renders on desktop
Browse files Browse the repository at this point in the history
  • Loading branch information
adamkewley committed Jul 4, 2024
1 parent ee4b274 commit 636a47a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions apps/hellotriangle/hellotriangle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,11 @@ void main()
const auto transform = identity<Transform>().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);
Expand Down

0 comments on commit 636a47a

Please sign in to comment.