X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fbackends%2Fvulkan%2Fframebuffer_backend.cpp;h=4c68546f15ed322181aad3ef9c136f92c9892ff3;hp=9af8a2f7b1a7a9e52464d6d0027da801bee96700;hb=fcc065736e303088ef121c554318e0cc028a0666;hpb=3d6f8d2781beb692e11488c34871ec62174e58df diff --git a/source/backends/vulkan/framebuffer_backend.cpp b/source/backends/vulkan/framebuffer_backend.cpp index 9af8a2f7..4c68546f 100644 --- a/source/backends/vulkan/framebuffer_backend.cpp +++ b/source/backends/vulkan/framebuffer_backend.cpp @@ -3,6 +3,7 @@ #include "framebuffer.h" #include "framebuffer_backend.h" #include "renderpass.h" +#include "swapchaintexture.h" #include "vulkan.h" using namespace std; @@ -53,6 +54,13 @@ bool VulkanFramebuffer::is_format_supported(const FrameFormat &fmt) return true; } +bool VulkanFramebuffer::is_presentable() const +{ + const Framebuffer &self = *static_cast(this); + return std::any_of(self.attachments.begin(), self.attachments.end(), + [](const Framebuffer::Attachment &a){ return dynamic_cast(a.tex); }); +} + void VulkanFramebuffer::update(unsigned mask) const { const Framebuffer &self = *static_cast(this);