summaryrefslogtreecommitdiffhomepage
path: root/main/draw.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2022-10-20 21:22:07 +0200
committerStanislaw Halik <sthalik@misaki.pl>2022-10-20 21:22:07 +0200
commit8ee0ff58ef0e09fd510ab0ba7bb9957c5e6461a5 (patch)
treef0d9bac3ef81d0c44b73d0f3648f1f522a3c9496 /main/draw.cpp
parent2ff4e6203f7d895d88ab9bb4a4415a884a8f3075 (diff)
only do MSAAA for isometrically projected entities
Diffstat (limited to 'main/draw.cpp')
-rw-r--r--main/draw.cpp18
1 files changed, 14 insertions, 4 deletions
diff --git a/main/draw.cpp b/main/draw.cpp
index 5eeb413c..d633db73 100644
--- a/main/draw.cpp
+++ b/main/draw.cpp
@@ -29,12 +29,15 @@ void app::drawEvent()
update(dt);
}
- GL::defaultFramebuffer.clear(GL::FramebufferClear::Color);
_shader.set_tint({1, 1, 1, 1});
+
{
- const with_shifted_camera_offset o{_shader, BASE_X, BASE_Y};
- draw_world();
- draw_cursor_tile();
+ //GL::defaultFramebuffer.clear(GL::FramebufferClear::Color);
+ _framebuffer.clear(GL::FramebufferClear::Color);
+ _framebuffer.bind();
+ draw_msaa();
+ GL::defaultFramebuffer.bind();
+ GL::Framebuffer::blit(_framebuffer, GL::defaultFramebuffer, {{}, windowSize()}, GL::FramebufferBlit::Color);
}
render_menu();
@@ -44,6 +47,13 @@ void app::drawEvent()
timeline.nextFrame();
}
+void app::draw_msaa()
+{
+ const with_shifted_camera_offset o{_shader, BASE_X, BASE_Y};
+ draw_world();
+ draw_cursor_tile();
+}
+
void app::draw_world()
{
#if 0