diff options
Diffstat (limited to 'src/vulkan_utils.hpp')
| -rw-r--r-- | src/vulkan_utils.hpp | 9 |
1 files changed, 8 insertions, 1 deletions
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<VkVertexInputAttributeDescription, 2> get_attr_descs() { + static constexpr std::array<VkVertexInputAttributeDescription, 3> 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 |
