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();
|
||||||
|
|
||||||
CvePipeline(const CvePipeline&) = delete;
|
CvePipeline(const CvePipeline&) = delete;
|
||||||
void operator=(const CvePipeline&) = delete;
|
CvePipeline& operator=(const CvePipeline&) = delete;
|
||||||
|
|
||||||
void bind(VkCommandBuffer commandBuffer);
|
void bind(VkCommandBuffer commandBuffer);
|
||||||
static PipelineConfigInfo defaultPipelineConfigInfo(uint32_t width, uint32_t height);
|
static PipelineConfigInfo defaultPipelineConfigInfo(uint32_t width, uint32_t height);
|
||||||
|
|||||||
@@ -362,7 +362,7 @@ void CveSwapChain::createSyncObjects() {
|
|||||||
VkSurfaceFormatKHR CveSwapChain::chooseSwapSurfaceFormat(
|
VkSurfaceFormatKHR CveSwapChain::chooseSwapSurfaceFormat(
|
||||||
const std::vector<VkSurfaceFormatKHR> &availableFormats) {
|
const std::vector<VkSurfaceFormatKHR> &availableFormats) {
|
||||||
for (const auto &availableFormat : 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) {
|
availableFormat.colorSpace == VK_COLOR_SPACE_SRGB_NONLINEAR_KHR) {
|
||||||
return availableFormat;
|
return availableFormat;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ class CveSwapChain {
|
|||||||
~CveSwapChain();
|
~CveSwapChain();
|
||||||
|
|
||||||
CveSwapChain(const CveSwapChain &) = delete;
|
CveSwapChain(const CveSwapChain &) = delete;
|
||||||
void operator=(const CveSwapChain &) = delete;
|
CveSwapChain &operator=(const CveSwapChain &) = delete;
|
||||||
|
|
||||||
VkFramebuffer getFrameBuffer(int index) { return swapChainFramebuffers[index]; }
|
VkFramebuffer getFrameBuffer(int index) { return swapChainFramebuffers[index]; }
|
||||||
VkRenderPass getRenderPass() { return renderPass; }
|
VkRenderPass getRenderPass() { return renderPass; }
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ namespace cve {
|
|||||||
void CveWindow::initWindow() {
|
void CveWindow::initWindow() {
|
||||||
glfwInit();
|
glfwInit();
|
||||||
glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API);
|
glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API);
|
||||||
glfwWindowHint(GLFW_RESIZABLE, GLFW_FALSE);
|
glfwWindowHint(GLFW_RESIZABLE, GLFW_TRUE);
|
||||||
|
|
||||||
window = glfwCreateWindow(width, height,
|
window = glfwCreateWindow(width, height,
|
||||||
windowName.c_str(), nullptr, nullptr);
|
windowName.c_str(), nullptr, nullptr);
|
||||||
|
|||||||
Reference in New Issue
Block a user