mirror of
https://gitea.windcorp.ru/Wind-Corporation/Progressia.git
synced 2025-04-21 19:30:46 +03:00
TMP / Fixed vulkan_frame.cpp
This commit is contained in:
parent
c064492de8
commit
50e3a44a81
@ -11,8 +11,8 @@
|
|||||||
namespace progressia::desktop {
|
namespace progressia::desktop {
|
||||||
|
|
||||||
Frame::Frame(Vulkan &vulkan)
|
Frame::Frame(Vulkan &vulkan)
|
||||||
: vulkan(vulkan),
|
: vulkan(vulkan), commandBuffer(vulkan.getCommandPool().allocateMultiUse()),
|
||||||
commandBuffer(vulkan.getCommandPool().allocateMultiUse()) {
|
imageAvailableSemaphore(), renderFinishedSemaphore(), inFlightFence() {
|
||||||
|
|
||||||
VkSemaphoreCreateInfo semaphoreInfo{};
|
VkSemaphoreCreateInfo semaphoreInfo{};
|
||||||
semaphoreInfo.sType = VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO;
|
semaphoreInfo.sType = VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO;
|
||||||
@ -97,12 +97,12 @@ bool Frame::startRender() {
|
|||||||
vulkan.getPipeline().getVk());
|
vulkan.getPipeline().getVk());
|
||||||
|
|
||||||
VkViewport viewport{};
|
VkViewport viewport{};
|
||||||
viewport.x = 0.0f;
|
viewport.x = 0.0F;
|
||||||
viewport.y = 0.0f;
|
viewport.y = 0.0F;
|
||||||
viewport.width = (float)extent.width;
|
viewport.width = (float)extent.width;
|
||||||
viewport.height = (float)extent.height;
|
viewport.height = (float)extent.height;
|
||||||
viewport.minDepth = 0.0f;
|
viewport.minDepth = 0.0F;
|
||||||
viewport.maxDepth = 1.0f;
|
viewport.maxDepth = 1.0F;
|
||||||
vkCmdSetViewport(commandBuffer, 0, 1, &viewport);
|
vkCmdSetViewport(commandBuffer, 0, 1, &viewport);
|
||||||
|
|
||||||
VkRect2D scissor{};
|
VkRect2D scissor{};
|
||||||
|
@ -10,6 +10,7 @@ Checks: "-*,\
|
|||||||
-cppcoreguidelines-pro-bounds-array-to-pointer-decay,\
|
-cppcoreguidelines-pro-bounds-array-to-pointer-decay,\
|
||||||
-cppcoreguidelines-pro-type-reinterpret-cast,\
|
-cppcoreguidelines-pro-type-reinterpret-cast,\
|
||||||
-cppcoreguidelines-pro-bounds-constant-array-index,\
|
-cppcoreguidelines-pro-bounds-constant-array-index,\
|
||||||
|
-*-avoid-c-arrays,\
|
||||||
-readability-else-after-return,\
|
-readability-else-after-return,\
|
||||||
-readability-named-parameter,\
|
-readability-named-parameter,\
|
||||||
-readability-use-anyofallof"
|
-readability-use-anyofallof"
|
||||||
@ -29,6 +30,9 @@ Checks: "-*,\
|
|||||||
# cppcoreguidelines-pro-bounds-constant-array-index
|
# cppcoreguidelines-pro-bounds-constant-array-index
|
||||||
# ignore reason: infeasible to avoid without GSL
|
# ignore reason: infeasible to avoid without GSL
|
||||||
|
|
||||||
|
# *-avoid-c-arrays
|
||||||
|
# ignore reason: often makes code significantly more verbose
|
||||||
|
|
||||||
# readability-else-after-return
|
# readability-else-after-return
|
||||||
# ignore reason: personal preference of OLEGSHA (using 'else' helps highlight
|
# ignore reason: personal preference of OLEGSHA (using 'else' helps highlight
|
||||||
# branches in code)
|
# branches in code)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user