Add RenderEngineSDK
This commit is contained in:
@@ -3,14 +3,34 @@
|
||||
#include <unordered_map>
|
||||
#include <string>
|
||||
#include <atomic>
|
||||
#include <glm/vec3.hpp>
|
||||
|
||||
#include <vulkan/vulkan.h>
|
||||
|
||||
class ModelManager
|
||||
{
|
||||
public:
|
||||
struct Vertex
|
||||
{
|
||||
glm::vec3 pos, color;
|
||||
static VkVertexInputBindingDescription get_binding_description();
|
||||
static std::array<VkVertexInputAttributeDescription, 2> get_vertex_attribute_descriptions();
|
||||
|
||||
};
|
||||
class StaticModel
|
||||
{
|
||||
//DATA
|
||||
};
|
||||
VkPhysicalDevice physical_device_;
|
||||
VkDevice device_;
|
||||
VkBuffer vertex_buffer_;
|
||||
VkBuffer index_buffer_;
|
||||
|
||||
|
||||
public:
|
||||
StaticModel(const std::vector<Vertex>& vertices, const std::vector<uint32_t>& indices,
|
||||
VkPhysicalDevice physical_device, VkDevice device);
|
||||
~StaticModel();
|
||||
|
||||
};
|
||||
|
||||
struct owner_counter
|
||||
{
|
||||
@@ -22,12 +42,14 @@ public:
|
||||
};
|
||||
|
||||
private:
|
||||
|
||||
VkPhysicalDevice physical_device_;
|
||||
VkDevice device_;
|
||||
std::unordered_map<unsigned int, owner_counter> models;
|
||||
|
||||
static unsigned int FNV1aHash (const char *buf);
|
||||
|
||||
public:
|
||||
ModelManager(VkPhysicalDevice physical_device, VkDevice device);
|
||||
~ModelManager();
|
||||
|
||||
StaticModel* LoadModel(const std::string& name);
|
||||
|
||||
Reference in New Issue
Block a user