去除swapChain.hpp依赖
parent
dfeca1b376
commit
26a66c4f0d
|
@ -391,7 +391,7 @@ VulkanExampleBase::VulkanExampleBase()
|
||||||
VulkanExampleBase::~VulkanExampleBase()
|
VulkanExampleBase::~VulkanExampleBase()
|
||||||
{
|
{
|
||||||
// Clean up Vulkan resources
|
// Clean up Vulkan resources
|
||||||
swapChain.cleanup();
|
//swapChain.cleanup();
|
||||||
vkDestroyDescriptorPool(device, descriptorPool, nullptr);
|
vkDestroyDescriptorPool(device, descriptorPool, nullptr);
|
||||||
vkDestroyRenderPass(device, renderPass, nullptr);
|
vkDestroyRenderPass(device, renderPass, nullptr);
|
||||||
for (uint32_t i = 0; i < frameBuffers.size(); i++) {
|
for (uint32_t i = 0; i < frameBuffers.size(); i++) {
|
||||||
|
@ -791,5 +791,5 @@ void VulkanExampleBase::initSwapchain()
|
||||||
|
|
||||||
void VulkanExampleBase::setupSwapChain()
|
void VulkanExampleBase::setupSwapChain()
|
||||||
{
|
{
|
||||||
swapChain.create(&width, &height, settings.vsync);
|
//swapChain.create(&width, &height, settings.vsync);
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,9 +30,9 @@
|
||||||
#include "keycodes.hpp"
|
#include "keycodes.hpp"
|
||||||
|
|
||||||
#include "VulkanDevice.hpp"
|
#include "VulkanDevice.hpp"
|
||||||
#include "VulkanSwapChain.hpp"
|
//#include "VulkanSwapChain.hpp"
|
||||||
|
|
||||||
#include "imgui/imgui.h"
|
//#include "imgui/imgui.h"
|
||||||
|
|
||||||
class VulkanExampleBase
|
class VulkanExampleBase
|
||||||
{
|
{
|
||||||
|
@ -42,7 +42,7 @@ private:
|
||||||
uint32_t destWidth;
|
uint32_t destWidth;
|
||||||
uint32_t destHeight;
|
uint32_t destHeight;
|
||||||
bool resizing = false;
|
bool resizing = false;
|
||||||
void handleMouseMove(int32_t x, int32_t y);
|
//void handleMouseMove(int32_t x, int32_t y);
|
||||||
PFN_vkCreateDebugReportCallbackEXT vkCreateDebugReportCallback;
|
PFN_vkCreateDebugReportCallbackEXT vkCreateDebugReportCallback;
|
||||||
PFN_vkDestroyDebugReportCallbackEXT vkDestroyDebugReportCallback;
|
PFN_vkDestroyDebugReportCallbackEXT vkDestroyDebugReportCallback;
|
||||||
VkDebugReportCallbackEXT debugReportCallback;
|
VkDebugReportCallbackEXT debugReportCallback;
|
||||||
|
@ -74,7 +74,7 @@ protected:
|
||||||
uint32_t currentBuffer = 0;
|
uint32_t currentBuffer = 0;
|
||||||
VkDescriptorPool descriptorPool;
|
VkDescriptorPool descriptorPool;
|
||||||
VkPipelineCache pipelineCache;
|
VkPipelineCache pipelineCache;
|
||||||
VulkanSwapChain swapChain;
|
//VulkanSwapChain swapChain;
|
||||||
std::string title = "Vulkan Example";
|
std::string title = "Vulkan Example";
|
||||||
std::string name = "vulkanExample";
|
std::string name = "vulkanExample";
|
||||||
//void windowResize();
|
//void windowResize();
|
||||||
|
|
|
@ -1626,7 +1626,7 @@ PlumageRender::PlumageRender()
|
||||||
VkFormatProperties formatProps;
|
VkFormatProperties formatProps;
|
||||||
|
|
||||||
// Check if the device supports blitting from optimal images (the swapchain images are in optimal format)
|
// 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)) {
|
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;
|
std::cerr << "Device does not support blitting from optimal tiled images, using copy instead of blit!" << std::endl;
|
||||||
supportsBlit = false;
|
supportsBlit = false;
|
||||||
|
|
Loading…
Reference in New Issue