MESH BUFFER
This commit is contained in:
parent
86d7adb07f
commit
523852da08
11 changed files with 93 additions and 51 deletions
19
Crafter.Graphics-Mesh.cppm
Normal file
19
Crafter.Graphics-Mesh.cppm
Normal 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) {
|
||||
|
||||
}
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue