diff options
Diffstat (limited to 'src/vk')
-rw-r--r-- | src/vk/graphics_pipeline_2d.cpp | 10 | ||||
-rw-r--r-- | src/vk/graphics_pipeline_3d.cpp | 14 | ||||
-rw-r--r-- | src/vk/renderer.cpp | 8 | ||||
-rw-r--r-- | src/vk/swapchain.cpp | 2 |
4 files changed, 17 insertions, 17 deletions
diff --git a/src/vk/graphics_pipeline_2d.cpp b/src/vk/graphics_pipeline_2d.cpp index 1509d2f..734a509 100644 --- a/src/vk/graphics_pipeline_2d.cpp +++ b/src/vk/graphics_pipeline_2d.cpp @@ -42,8 +42,8 @@ load_framebuffer(void *obj) cg_core.vk_graphics_pipeline_2d_layout->render_pass; framebuffer_info.attachmentCount = attachments.size(); framebuffer_info.pAttachments = attachments.data(); - framebuffer_info.width = cg_core.screen_width; - framebuffer_info.height = cg_core.screen_height; + framebuffer_info.width = cg_core.display_width; + framebuffer_info.height = cg_core.display_height; framebuffer_info.layers = 1; if(vkCreateFramebuffer( @@ -130,14 +130,14 @@ load_pipeline(void *obj) VkViewport viewport = {}; viewport.x = 0; viewport.y = 0; - viewport.width = cg_core.screen_width; - viewport.height = cg_core.screen_height; + viewport.width = cg_core.display_width; + viewport.height = cg_core.display_height; viewport.minDepth = 0.0f; viewport.maxDepth = 1.0f; VkRect2D scissor = {}; scissor.offset = {0, 0}; - scissor.extent = {cg_core.screen_width, cg_core.screen_height}; + scissor.extent = {cg_core.display_width, cg_core.display_height}; VkPipelineViewportStateCreateInfo viewport_state = {}; viewport_state.sType = diff --git a/src/vk/graphics_pipeline_3d.cpp b/src/vk/graphics_pipeline_3d.cpp index f3a54e7..f08e43a 100644 --- a/src/vk/graphics_pipeline_3d.cpp +++ b/src/vk/graphics_pipeline_3d.cpp @@ -187,8 +187,8 @@ load_depth_image(void *obj) auto self = static_cast<VK::GraphicsPipeline3D*>(obj); VkExtent3D extent3d{}; - extent3d.width = cg_core.screen_width; - extent3d.height = cg_core.screen_height; + extent3d.width = cg_core.display_width; + extent3d.height = cg_core.display_height; extent3d.depth = 1; try @@ -273,8 +273,8 @@ load_framebuffer(void *obj) cg_core.vk_graphics_pipeline_3d_layout->render_pass; framebuffer_info.attachmentCount = attachments.size(); framebuffer_info.pAttachments = attachments.data(); - framebuffer_info.width = cg_core.screen_width; - framebuffer_info.height = cg_core.screen_height; + framebuffer_info.width = cg_core.display_width; + framebuffer_info.height = cg_core.display_height; framebuffer_info.layers = 1; @@ -371,14 +371,14 @@ load_pipeline(void *obj) VkViewport viewport = {}; viewport.x = 0; viewport.y = 0; - viewport.width = cg_core.screen_width; - viewport.height = cg_core.screen_height; + viewport.width = cg_core.display_width; + viewport.height = cg_core.display_height; viewport.minDepth = 0.0f; viewport.maxDepth = 1.0f; VkRect2D scissor = {}; scissor.offset = {0, 0}; - scissor.extent = {cg_core.screen_width, cg_core.screen_height}; + scissor.extent = {cg_core.display_width, cg_core.display_height}; VkPipelineViewportStateCreateInfo viewport_state = {}; viewport_state.sType = diff --git a/src/vk/renderer.cpp b/src/vk/renderer.cpp index 5ebc271..7492cce 100644 --- a/src/vk/renderer.cpp +++ b/src/vk/renderer.cpp @@ -212,8 +212,8 @@ Renderer::draw() cg_core.vk_graphics_pipeline_3d->swapchain_framebuffers[image_index]; render_pass_begin.renderArea.offset = {0, 0}; render_pass_begin.renderArea.extent = { - static_cast<uint32_t>(cg_core.screen_width), - static_cast<uint32_t>(cg_core.screen_height)}; + static_cast<uint32_t>(cg_core.display_width), + static_cast<uint32_t>(cg_core.display_height)}; render_pass_begin.clearValueCount = clear_values.size(); render_pass_begin.pClearValues = clear_values.data(); @@ -239,8 +239,8 @@ Renderer::draw() cg_core.vk_graphics_pipeline_2d->swapchain_framebuffers[image_index]; render_pass_begin.renderArea.offset = {0, 0}; render_pass_begin.renderArea.extent = { - static_cast<uint32_t>(cg_core.screen_width), - static_cast<uint32_t>(cg_core.screen_height)}; + static_cast<uint32_t>(cg_core.display_width), + static_cast<uint32_t>(cg_core.display_height)}; render_pass_begin.clearValueCount = 0; render_pass_begin.pClearValues = nullptr; diff --git a/src/vk/swapchain.cpp b/src/vk/swapchain.cpp index 1dd19d9..2c67ebd 100644 --- a/src/vk/swapchain.cpp +++ b/src/vk/swapchain.cpp @@ -51,7 +51,7 @@ load_swapchain(void *obj) swapchain_create_info.imageColorSpace = vk_surface_formats[0].colorSpace; swapchain_create_info.imageExtent = { - cg_core.screen_width, cg_core.screen_height}; + cg_core.display_width, cg_core.display_height}; swapchain_create_info.imageArrayLayers = 1; swapchain_create_info.imageUsage = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT; swapchain_create_info.imageSharingMode = VK_SHARING_MODE_EXCLUSIVE; |