fixes + starting on window resizing

This commit is contained in:
2026-02-20 20:35:08 +00:00
parent 253fd3006a
commit e4124c0aaf
5 changed files with 4 additions and 4 deletions

Binary file not shown.

View File

@@ -26,7 +26,7 @@ namespace cve {
~CvePipeline();
CvePipeline(const CvePipeline&) = delete;
void operator=(const CvePipeline&) = delete;
CvePipeline& operator=(const CvePipeline&) = delete;
void bind(VkCommandBuffer commandBuffer);
static PipelineConfigInfo defaultPipelineConfigInfo(uint32_t width, uint32_t height);

View File

@@ -362,7 +362,7 @@ void CveSwapChain::createSyncObjects() {
VkSurfaceFormatKHR CveSwapChain::chooseSwapSurfaceFormat(
const std::vector<VkSurfaceFormatKHR> &availableFormats) {
for (const auto &availableFormat : availableFormats) {
if (availableFormat.format == VK_FORMAT_B8G8R8A8_UNORM &&
if (availableFormat.format == VK_FORMAT_B8G8R8A8_SRGB &&
availableFormat.colorSpace == VK_COLOR_SPACE_SRGB_NONLINEAR_KHR) {
return availableFormat;
}

View File

@@ -19,7 +19,7 @@ class CveSwapChain {
~CveSwapChain();
CveSwapChain(const CveSwapChain &) = delete;
void operator=(const CveSwapChain &) = delete;
CveSwapChain &operator=(const CveSwapChain &) = delete;
VkFramebuffer getFrameBuffer(int index) { return swapChainFramebuffers[index]; }
VkRenderPass getRenderPass() { return renderPass; }

View File

@@ -16,7 +16,7 @@ namespace cve {
void CveWindow::initWindow() {
glfwInit();
glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API);
glfwWindowHint(GLFW_RESIZABLE, GLFW_FALSE);
glfwWindowHint(GLFW_RESIZABLE, GLFW_TRUE);
window = glfwCreateWindow(width, height,
windowName.c_str(), nullptr, nullptr);