diff --git a/src/rendering/arbtri.jai b/src/rendering/arbtri.jai index c51eea4..01406fb 100644 --- a/src/rendering/arbtri.jai +++ b/src/rendering/arbtri.jai @@ -132,7 +132,7 @@ flush_arb_commands :: () { sg_apply_scissor_rect(s.x, s.y, s.w, s.h, true); case .REMOVE_SCISSOR; w,h := get_window_size(); - sg_apply_scissor_rect(0, 0, w, w, true); + sg_apply_scissor_rect(0, 0, w, h, true); case .DRAW_TEXT; sgl_draw_layer(it.layer); } diff --git a/src/rendering/rendering.jai b/src/rendering/rendering.jai index f797f06..ed9c734 100644 --- a/src/rendering/rendering.jai +++ b/src/rendering/rendering.jai @@ -31,6 +31,10 @@ on_window_resize :: () { create_plane_pipeline_reflection_images(); create_final_image(); create_ssao_images(); + // Reset glyph cache so stale sizes from resizing don't fill the atlas. + w, h : s32; + fonsGetAtlasSize(state.fons, *w, *h); + fonsResetAtlas(state.fons, w, h); } #scope_export