diff --git a/vk_engine.cpp b/vk_engine.cpp index ed4fe8f..6119da7 100644 --- a/vk_engine.cpp +++ b/vk_engine.cpp @@ -797,26 +797,18 @@ GPUMeshBuffers VulkanEngine::uploadMesh(std::span indices, std::span rect_vertices; + + rect_vertices[0].position = {0.5,-0.5,0}; + rect_vertices[1].position = {0.5,0.5,0}; + rect_vertices[2].position = {-0.5,-0.5,0}; + rect_vertices[3].position = {-0.5,0.5,0}; - rect_vertices[0].position = {0.5,-0.5, 0}; - rect_vertices[1].position = {0.5,0.5, 0}; - rect_vertices[2].position = {-0.5,-0.5, 0}; - rect_vertices[3].position = {-0.5,0.5, 0}; - - rect_vertices[0].color = {0,0, 0,1}; - rect_vertices[1].color = { 0.5,0.5,0.5 ,1}; + rect_vertices[0].color = { 0, 0, 0, 1 }; + rect_vertices[1].color = { 0.5,0.5,0.5,1 }; rect_vertices[2].color = { 1,0, 0,1 }; rect_vertices[3].color = { 0,1, 0,1 }; - std::array rect_indices; - - rect_indices[0] = 0; - rect_indices[1] = 1; - rect_indices[2] = 2; - - rect_indices[3] = 2; - rect_indices[4] = 1; - rect_indices[5] = 3; + std::array rect_indices{0, 1, 2, 2, 1, 3}; rectangle = uploadMesh(rect_indices, rect_vertices);