summaryrefslogtreecommitdiffhomepage
path: root/main/draw.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2022-10-23 13:06:32 +0200
committerStanislaw Halik <sthalik@misaki.pl>2022-10-23 13:06:32 +0200
commit55f284c6e3d2da6774f758e047945b102b9f5b23 (patch)
treebe5abe0eca392f345680a713240fcf7a84ee8088 /main/draw.cpp
parenta62bd981c2a973952f3f5e22ca768dd961991d21 (diff)
fix msaa fbo
Diffstat (limited to 'main/draw.cpp')
-rw-r--r--main/draw.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/main/draw.cpp b/main/draw.cpp
index e634823f..b2e0a637 100644
--- a/main/draw.cpp
+++ b/main/draw.cpp
@@ -4,6 +4,8 @@
#include <Magnum/GL/DefaultFramebuffer.h>
#include <Magnum/GL/Renderer.h>
+//#define FM_SKIP_MSAA
+
namespace floormat {
void app::drawEvent()
@@ -29,11 +31,16 @@ void app::drawEvent()
_shader.set_tint({1, 1, 1, 1});
{
- _framebuffer.clear(GL::FramebufferClear::Color);
- _framebuffer.bind();
+ GL::defaultFramebuffer.clear(GL::FramebufferClear::Color);
+#if defined FM_MSAA && !defined FM_SKIP_MSAA
+ _msaa_framebuffer.clear(GL::FramebufferClear::Color);
+ _msaa_framebuffer.bind();
+#endif
draw_msaa();
+#if defined FM_MSAA && !defined FM_SKIP_MSAA
GL::defaultFramebuffer.bind();
- GL::Framebuffer::blit(_framebuffer, GL::defaultFramebuffer, {{}, windowSize()}, GL::FramebufferBlit::Color);
+ GL::Framebuffer::blit(_msaa_framebuffer, GL::defaultFramebuffer, {{}, windowSize()}, GL::FramebufferBlit::Color);
+#endif
}
render_menu();