From 8874f4f4c6f95c2db7654c769e7747b3e3cf863a Mon Sep 17 00:00:00 2001 From: vimene Date: Sat, 27 Dec 2025 20:09:53 +0100 Subject: finished adding textures --- src/vulkan_utils.hpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/vulkan_utils.hpp') diff --git a/src/vulkan_utils.hpp b/src/vulkan_utils.hpp index 1efc73e..99fd912 100644 --- a/src/vulkan_utils.hpp +++ b/src/vulkan_utils.hpp @@ -39,7 +39,7 @@ struct Vertex { }; } - static constexpr std::array get_attr_descs() { + static constexpr std::array get_attr_descs() { return { VkVertexInputAttributeDescription { .location = 0, @@ -53,11 +53,18 @@ struct Vertex { .format = VK_FORMAT_R32G32B32_SFLOAT, .offset = offsetof(Vertex, col), }, + VkVertexInputAttributeDescription { + .location = 2, + .binding = 0, + .format = VK_FORMAT_R32G32_SFLOAT, + .offset = offsetof(Vertex, uv), + }, }; } engine::math::Vector2 pos; engine::math::Vector3 col; + engine::math::Vector2 uv; }; // TODO: move to a better place. Also, see TODOs for struct Vertex -- cgit v1.2.3