diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2023-08-24 08:32:46 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2023-08-24 08:32:46 +0200 |
commit | 0635b7f5e8902856a86517aa921ac9f05e295917 (patch) | |
tree | d188e129f61f6027071bda67d778631cd03c5bec | |
parent | a0fde780a83d549c191e6aba5025b9e79c13ed39 (diff) |
leave scissor test enabled
-rw-r--r-- | editor/imgui.cpp | 4 | ||||
-rw-r--r-- | main/draw.cpp | 2 | ||||
-rw-r--r-- | shaders/lightmap.cpp | 1 |
3 files changed, 2 insertions, 5 deletions
diff --git a/editor/imgui.cpp b/editor/imgui.cpp index 5bb0ad67..e49b9120 100644 --- a/editor/imgui.cpp +++ b/editor/imgui.cpp @@ -96,8 +96,6 @@ float app::draw_main_menu() void app::draw_ui() { - GL::Renderer::enable(GL::Renderer::Feature::ScissorTest); - const auto dpi = M->dpi_scale().min(); [[maybe_unused]] const auto style_ = style_saver{}; auto& style = ImGui::GetStyle(); @@ -129,8 +127,6 @@ void app::draw_ui() draw_z_level(); do_popup_menu(); ImGui::EndFrame(); - - GL::Renderer::disable(GL::Renderer::Feature::ScissorTest); } void app::draw_clickables() diff --git a/main/draw.cpp b/main/draw.cpp index 59c0feed..7dacc870 100644 --- a/main/draw.cpp +++ b/main/draw.cpp @@ -59,7 +59,7 @@ void main_impl::recalc_viewport(Vector2i fb_size, Vector2i win_size) noexcept GL::Renderer::disable(Feature::FaceCulling); GL::Renderer::disable(Feature::DepthTest); GL::Renderer::enable(Feature::Blending); - GL::Renderer::disable(Feature::ScissorTest); + GL::Renderer::enable(Feature::ScissorTest); GL::Renderer::enable(Feature::DepthClamp); GL::Renderer::setDepthFunction(DepthFunction::Greater); GL::Renderer::setScissor({{}, fb_size}); diff --git a/shaders/lightmap.cpp b/shaders/lightmap.cpp index 68afc634..6b09c5f8 100644 --- a/shaders/lightmap.cpp +++ b/shaders/lightmap.cpp @@ -376,6 +376,7 @@ void lightmap_shader::bind() { framebuffer.fb.mapForDraw(GL::Framebuffer::ColorAttachment{0}); framebuffer.fb.bind(); + GL::Renderer::setScissor({{}, {(int)1e6, (int)1e6}}); } GL::Texture2D& lightmap_shader::scratch_texture() |