fixes + starting on window resizing
This commit is contained in:
BIN
VulkanTest
BIN
VulkanTest
Binary file not shown.
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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; }
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user