diff --git a/lib/ivis_opengl/gfx_api_vk.cpp b/lib/ivis_opengl/gfx_api_vk.cpp index 931e861f489..0de4a6a4ff2 100644 --- a/lib/ivis_opengl/gfx_api_vk.cpp +++ b/lib/ivis_opengl/gfx_api_vk.cpp @@ -2694,7 +2694,7 @@ static bool createDepthStencilImage(const vk::PhysicalDevice& physicalDevice, co void VkRoot::createDefaultRenderpass(vk::Format swapchainFormat, vk::Format depthFormat) { - bool msaaEnabled = (msaaSamples != vk::SampleCountFlagBits::e1); + bool msaaEnabled = false; // default render pass doesn't get MSAA auto attachments = std::vector{ @@ -2777,7 +2777,7 @@ void VkRoot::createDefaultRenderpass(vk::Format swapchainFormat, vk::Format dept renderPasses[DEFAULT_RENDER_PASS_ID].rp_compat_info = std::make_shared(createInfo); renderPasses[DEFAULT_RENDER_PASS_ID].rp = dev.createRenderPass(createInfo, nullptr, vkDynLoader); - renderPasses[DEFAULT_RENDER_PASS_ID].msaaSamples = msaaSamples; + renderPasses[DEFAULT_RENDER_PASS_ID].msaaSamples = (msaaEnabled) ? msaaSamples : vk::SampleCountFlagBits::e1; // createFramebuffers for default render pass ASSERT(!swapchainImageView.empty(), "No swapchain image views?"); diff --git a/lib/sdl/main_sdl.cpp b/lib/sdl/main_sdl.cpp index 902f0cfda37..2011feab49b 100644 --- a/lib/sdl/main_sdl.cpp +++ b/lib/sdl/main_sdl.cpp @@ -2560,11 +2560,8 @@ void wzSDLPreWindowCreate_InitOpenGLAttributes(int antialiasing, bool useOpenGLE // Enable stencil buffer, needed for shadows to work. SDL_GL_SetAttribute(SDL_GL_STENCIL_SIZE, 8); - if (antialiasing) - { - SDL_GL_SetAttribute(SDL_GL_MULTISAMPLEBUFFERS, 1); - SDL_GL_SetAttribute(SDL_GL_MULTISAMPLESAMPLES, antialiasing); - } + // Do *not* enable multisampling on the default framebuffer (i.e. setting SDL_GL_MULTISAMPLEBUFFERS) + // This is handled separately for the scene render buffer / frame buffer if (!sdl_OpenGL_Impl::configureOpenGLContextRequest(sdl_OpenGL_Impl::getInitialContextRequest(useOpenGLES), useOpenGLESLibrary)) {