This commit is contained in:
ZY4N
2025-03-23 21:11:22 +01:00
parent 510398423a
commit c609d49f0d
49 changed files with 1412 additions and 924 deletions

View File

@@ -0,0 +1,36 @@
#pragma once
#include "resource_manager.hpp"
namespace zgl
{
class resource_handle
{
public:
using id_type = reference_counter::gl_id_type;
resource_handle() = default;
inline resource_handle(id_type id, reference_counter* manager);
resource_handle(const resource_handle& other) = delete;
resource_handle& operator=(const resource_handle& other) = delete;
inline resource_handle(resource_handle&& other) noexcept;
inline resource_handle& operator=(resource_handle&& other) noexcept;
inline ~resource_handle();
protected:
id_type m_id{ 0 };
private:
reference_counter* m_counter{ nullptr };
};
}
#define INCLUDE_RESOURCE_HANDLE_IMPLEMENTATION
#include "opengl/resource_management/resource_handle.ipp"
#undef INCLUDE_RESOURCE_HANDLE_IMPLEMENTATION