Skip to content

Commit

Permalink
refactoring;
Browse files Browse the repository at this point in the history
  • Loading branch information
NateSeymour committed Nov 14, 2024
1 parent 13dec0d commit 872621e
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions src/calculator/renderer/VulkanRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,27 +28,27 @@ void VulkanRenderer::initResources()
.pName = "main",
};

std::array<VkPipelineShaderStageCreateInfo, 2> shader_stages = {vert_shader_stage_info, frag_shader_stage_info};
std::array shader_stages = {vert_shader_stage_info, frag_shader_stage_info};

VkVertexInputBindingDescription vertex_input_binding_description {
.binding = 0,
.stride = sizeof(unlogic::Vertex),
.inputRate = VK_VERTEX_INPUT_RATE_VERTEX,
};

std::array<VkVertexInputAttributeDescription, 2> vertex_attribute_descriptions = {
VkVertexInputAttributeDescription {
.location = 0,
.binding = 0,
.format = VK_FORMAT_R32G32_SFLOAT,
.offset = offsetof(unlogic::Vertex, position),
},
VkVertexInputAttributeDescription {
.location = 1,
.binding = 0,
.format = VK_FORMAT_R32G32B32A32_SFLOAT,
.offset = offsetof(unlogic::Vertex, color),
},
std::array vertex_attribute_descriptions = {
VkVertexInputAttributeDescription {
.location = 0,
.binding = 0,
.format = VK_FORMAT_R32G32_SFLOAT,
.offset = offsetof(unlogic::Vertex, position),
},
VkVertexInputAttributeDescription {
.location = 1,
.binding = 0,
.format = VK_FORMAT_R32G32B32A32_SFLOAT,
.offset = offsetof(unlogic::Vertex, color),
},
};

VkPipelineVertexInputStateCreateInfo vertex_input_info {
Expand All @@ -65,7 +65,7 @@ void VulkanRenderer::initResources()
.primitiveRestartEnable = VK_TRUE,
};

std::array<VkDynamicState, 2> dynamic_states = {
std::array dynamic_states = {
VK_DYNAMIC_STATE_VIEWPORT,
VK_DYNAMIC_STATE_SCISSOR,
};
Expand Down

0 comments on commit 872621e

Please sign in to comment.