#pragma once #include "hk_device.hpp" // libs #define GLM_FORCE_RADIANS #define GLM_FORCE_DEPTH_ZERO_TO_ONE #include #include namespace hk{ class Model { public: struct Vertex { glm::vec2 posision; glm::vec3 color; static std::vector getBindingDescriptions(); static std::vector getAttributeDescriptions(); }; Model(Device &device, const std::vector &vertices); ~Model(); Model(const Model &) = delete; Model &operator=(const Model &) = delete; void bind(VkCommandBuffer commandBuffer); void draw(VkCommandBuffer commandBuffer); private: void createVertexBuffers(const std::vector &vertices); Device &device; VkBuffer vertexBuffer; VkDeviceMemory vertexBufferMemory; uint32_t vertexCount; }; }