From 26a66c4f0d9ab7fad54caa81d8b227d4341d64aa Mon Sep 17 00:00:00 2001 From: ink-soul Date: Tue, 16 Apr 2024 16:59:10 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E9=99=A4swapChain.hpp=E4=BE=9D?= =?UTF-8?q?=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- base/vulkanexamplebase.cpp | 4 ++-- base/vulkanexamplebase.h | 8 ++++---- src/render/render.cpp | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/base/vulkanexamplebase.cpp b/base/vulkanexamplebase.cpp index 64acbc6..b8e704b 100644 --- a/base/vulkanexamplebase.cpp +++ b/base/vulkanexamplebase.cpp @@ -391,7 +391,7 @@ VulkanExampleBase::VulkanExampleBase() VulkanExampleBase::~VulkanExampleBase() { // Clean up Vulkan resources - swapChain.cleanup(); + //swapChain.cleanup(); vkDestroyDescriptorPool(device, descriptorPool, nullptr); vkDestroyRenderPass(device, renderPass, nullptr); for (uint32_t i = 0; i < frameBuffers.size(); i++) { @@ -791,5 +791,5 @@ void VulkanExampleBase::initSwapchain() void VulkanExampleBase::setupSwapChain() { - swapChain.create(&width, &height, settings.vsync); + //swapChain.create(&width, &height, settings.vsync); } diff --git a/base/vulkanexamplebase.h b/base/vulkanexamplebase.h index bf371b1..2805225 100644 --- a/base/vulkanexamplebase.h +++ b/base/vulkanexamplebase.h @@ -30,9 +30,9 @@ #include "keycodes.hpp" #include "VulkanDevice.hpp" -#include "VulkanSwapChain.hpp" +//#include "VulkanSwapChain.hpp" -#include "imgui/imgui.h" +//#include "imgui/imgui.h" class VulkanExampleBase { @@ -42,7 +42,7 @@ private: uint32_t destWidth; uint32_t destHeight; bool resizing = false; - void handleMouseMove(int32_t x, int32_t y); + //void handleMouseMove(int32_t x, int32_t y); PFN_vkCreateDebugReportCallbackEXT vkCreateDebugReportCallback; PFN_vkDestroyDebugReportCallbackEXT vkDestroyDebugReportCallback; VkDebugReportCallbackEXT debugReportCallback; @@ -74,7 +74,7 @@ protected: uint32_t currentBuffer = 0; VkDescriptorPool descriptorPool; VkPipelineCache pipelineCache; - VulkanSwapChain swapChain; + //VulkanSwapChain swapChain; std::string title = "Vulkan Example"; std::string name = "vulkanExample"; //void windowResize(); diff --git a/src/render/render.cpp b/src/render/render.cpp index b017814..e841a33 100644 --- a/src/render/render.cpp +++ b/src/render/render.cpp @@ -1626,7 +1626,7 @@ PlumageRender::PlumageRender() VkFormatProperties formatProps; // Check if the device supports blitting from optimal images (the swapchain images are in optimal format) - vkGetPhysicalDeviceFormatProperties(physicalDevice, swapChain.colorFormat, &formatProps); + vkGetPhysicalDeviceFormatProperties(physicalDevice, colorFormat, &formatProps); if (!(formatProps.optimalTilingFeatures & VK_FORMAT_FEATURE_BLIT_SRC_BIT)) { std::cerr << "Device does not support blitting from optimal tiled images, using copy instead of blit!" << std::endl; supportsBlit = false;