From e2a14db15f1446d7c88bf6c6a23f5dadf3d27a1a Mon Sep 17 00:00:00 2001 From: Rebekah Rowe Date: Sun, 28 Jul 2024 16:01:43 -0400 Subject: [PATCH] Working 2d example, needed the vertex drawing order changed. --- src/main.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 6cf7077..ecd5a0d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -313,7 +313,7 @@ private: .rasterizerDiscardEnable = vk::False, .polygonMode = vk::PolygonMode::eFill, .cullMode = vk::CullModeFlagBits::eBack, - .frontFace = vk::FrontFace::eCounterClockwise, + .frontFace = UsesProjection() ? vk::FrontFace::eCounterClockwise : vk::FrontFace::eClockwise, .depthBiasEnable = vk::False, .depthBiasConstantFactor = 0.0f, // Optional .depthBiasClamp = 0.0f, // Optional @@ -550,10 +550,10 @@ private: VulkanRenderPipeline vk_pipeline_third; static inline const std::vector vertices_rect_sample = { - { { -0.5f, -0.5f }, { 1.0f, 0.0f, 0.0f }, { 0.0f, 0.0f } }, - { { 0.5f, -0.5f }, { 0.0f, 1.0f, 0.0f }, { 1.0f, 0.0f } }, - { { 0.5f, 0.5f }, { 0.0f, 0.0f, 1.0f }, { 1.0f, 1.0f } }, - { { -0.5f, 0.5f }, { 1.0f, 1.0f, 1.0f }, { 0.0f, 1.0f } } + { { -0.2f, -0.2f }, { 1.0f, 0.0f, 0.0f }, { 0.0f, 0.0f } }, + { { 0.2f, -0.2f }, { 0.0f, 1.0f, 0.0f }, { 1.0f, 0.0f } }, + { { 0.2f, 0.2f }, { 0.0f, 0.0f, 1.0f }, { 1.0f, 1.0f } }, + { { -0.2f, 0.2f }, { 1.0f, 1.0f, 1.0f }, { 0.0f, 1.0f } } }; static inline const std::vector vertices_cube_sample = {