去除swapChain.hpp依赖
parent
dfeca1b376
commit
26a66c4f0d
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue