Files
UwU-Engine/Core/Game/ModelManager.hpp
T

35 lines
609 B
C++

#pragma once
#include <unordered_map>
#include <string>
#include <atomic>
class ModelManager
{
public:
class StaticModel
{
//DATA
};
struct owner_counter
{
std::atomic_ullong counter;
StaticModel* model;
owner_counter() = default;
owner_counter(const owner_counter& other);
};
private:
std::unordered_map<unsigned int, owner_counter> models;
static unsigned int FNV1aHash (const char *buf);
public:
~ModelManager();
StaticModel* LoadModel(const std::string& name);
void FreeModel(const std::string& name);
};