diff options
| author | vimene <vincent.menegaux@gmail.com> | 2025-12-27 20:09:53 +0100 |
|---|---|---|
| committer | vimene <vincent.menegaux@gmail.com> | 2025-12-27 20:09:53 +0100 |
| commit | 8874f4f4c6f95c2db7654c769e7747b3e3cf863a (patch) | |
| tree | 5d9da49bcf5e57b5c30595b16344f288ac0ab338 /src/vulkan_utils.hpp | |
| parent | bdb86fa1d6f1d2f11e05a931db7597310b1fe9b5 (diff) | |
| download | engine-8874f4f4c6f95c2db7654c769e7747b3e3cf863a.tar.gz | |
finished adding textures
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 |
