MESH BUFFER

This commit is contained in:
Jorijn van der Graaf 2025-04-27 01:57:25 +02:00
commit 523852da08
11 changed files with 93 additions and 51 deletions

View file

@ -0,0 +1,19 @@
module;
#include <cstdint>
#include <vulkan/vulkan.h>
export module Crafter.Graphics:Mesh;
import :VulkanBuffer;
namespace Crafter {
export template <typename VertexType>
class Mesh {
public:
Buffer<VertexType> verticies;
Buffer<std::uint32_t> indicies;
Mesh(std::uint32_t vertexCount, std::uint32_t indexCount) : verticies(VK_BUFFER_USAGE_STORAGE_BUFFER_BIT, VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT, vertexCount), indicies(VK_BUFFER_USAGE_STORAGE_BUFFER_BIT, VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT, indexCount) {
}
};
}