diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2022-10-24 13:08:17 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-10-24 13:08:17 +0200 |
commit | feb9830aa3624ecd227768695c70184ea1b086ec (patch) | |
tree | df89315f57190d763afffb61d27e617498e83e06 /main | |
parent | 3706fcce55b5cc8c27def44eeedd1b293097384d (diff) |
kill MSAA #define
Diffstat (limited to 'main')
-rw-r--r-- | main/floormat-main-impl.cpp | 6 | ||||
-rw-r--r-- | main/floormat-main-impl.hpp | 4 |
2 files changed, 2 insertions, 8 deletions
diff --git a/main/floormat-main-impl.cpp b/main/floormat-main-impl.cpp index bb92c1d9..e24ef421 100644 --- a/main/floormat-main-impl.cpp +++ b/main/floormat-main-impl.cpp @@ -70,13 +70,11 @@ auto main_impl::make_gl_conf(const fm_settings& s) -> GLConfiguration void main_impl::recalc_viewport(Vector2i size) noexcept { GL::defaultFramebuffer.setViewport({{}, size }); -#ifdef FM_MSAA _msaa_framebuffer.detach(GL::Framebuffer::ColorAttachment{0}); _msaa_renderbuffer = Magnum::GL::Renderbuffer{}; _msaa_renderbuffer.setStorageMultisample(s.msaa_samples, GL::RenderbufferFormat::RGBA8, size); _msaa_framebuffer.setViewport({{}, size }); _msaa_framebuffer.attachRenderbuffer(GL::Framebuffer::ColorAttachment{0}, _msaa_renderbuffer); -#endif _shader.set_scale(Vector2{size}); app.on_viewport_event(size); } @@ -182,13 +180,13 @@ void main_impl::drawEvent() { GL::defaultFramebuffer.clear(GL::FramebufferClear::Color); -#if defined FM_MSAA && !defined FM_SKIP_MSAA +#ifndef FM_SKIP_MSAA _msaa_framebuffer.clear(GL::FramebufferClear::Color); _msaa_framebuffer.bind(); #endif draw_world(); app.draw_msaa(); -#if defined FM_MSAA && !defined FM_SKIP_MSAA +#ifndef FM_SKIP_MSAA GL::defaultFramebuffer.bind(); GL::Framebuffer::blit(_msaa_framebuffer, GL::defaultFramebuffer, {{}, windowSize()}, GL::FramebufferBlit::Color); #endif diff --git a/main/floormat-main-impl.hpp b/main/floormat-main-impl.hpp index 4ca375bf..9cd156e3 100644 --- a/main/floormat-main-impl.hpp +++ b/main/floormat-main-impl.hpp @@ -15,8 +15,6 @@ #include <Magnum/GL/RenderbufferFormat.h> #include <Magnum/Platform/Sdl2Application.h> -#define FM_MSAA - namespace floormat { struct floormat_app; @@ -72,10 +70,8 @@ private: struct draw_bounds final { std::int16_t minx, maxx, miny, maxy; }; -#ifdef FM_MSAA GL::Framebuffer _msaa_framebuffer{{{}, window_size()}}; GL::Renderbuffer _msaa_renderbuffer{}; -#endif void recalc_viewport(Vector2i size) noexcept; void draw_world() noexcept; |