26 Vertex{{0.0f, -0.5f, 0.0f}, {1.0f, 0.0f, 0.0f}},
27 Vertex{{0.5f, 0.5f, 0.0f}, {0.0f, 1.0f, 0.0f}},
28 Vertex{{-0.5f, 0.5f, 0.0f}, {0.0f, 0.0f, 1.0f}},
32 Vertex{{-0.5f, -0.5f, 0.0f}, {1.0f, 0.0f, 0.0f}},
33 Vertex{{0.5f, -0.5f, 0.0f}, {0.0f, 1.0f, 0.0f}},
34 Vertex{{0.5f, 0.5f, 0.0f}, {0.0f, 0.0f, 1.0f}},
35 Vertex{{-0.5f, 0.5f, 0.0f}, {1.0f, 1.0f, 1.0f}}};
44 Mesh(
const std::vector<Vertex>& vertices,
45 const std::vector<uint16_t>& indices);
50 void draw(const ::vk::CommandBuffer& cmd)
const;
51 void bind(const ::vk::CommandBuffer& cmd)
const;
53 [[nodiscard]]
auto loaded()
const {
return loaded_; }
58 std::shared_ptr<vk::Shader> shader_;
59 std::vector<Vertex> vertices_;
60 std::vector<uint16_t> indices_;
61 std::shared_ptr<vk::Buffer> index_buffer_;
62 std::shared_ptr<vk::Buffer> vertex_buffer_;
63 std::shared_ptr<vk::Buffer> uniform_buffer_;