tried making naming more uniform and implemented most of the opengl managers

This commit is contained in:
ZY4N
2025-03-25 02:22:44 +01:00
parent c609d49f0d
commit 71ea2d9237
155 changed files with 4097 additions and 2434 deletions

View File

@@ -0,0 +1,35 @@
#pragma once
#include "../../assets/data_stores"
#include "opengl/resource_management/resource_manager.hpp"
#include "opengl/handles/index_buffer_handle.hpp"
#include "opengl/metadata/index_buffer_metadata.hpp"
namespace zgl
{
class mesh_index_buffer_manager
{
public:
using store_type = dynamic_mesh_store;
using store_id_type = store_type::id_type;
using metadata_type = index_buffer_metadata;
using handle_type = index_buffer_handle;
using resource_manager_type = resource_manager<store_id_type, metadata_type>;
using entry_type = std::pair<handle_type, metadata_type>;
static constexpr std::size_t min_garbage_collection_count = 4;
void process(store_type& store);
std::optional<entry_type> get_handle(store_id_type id);
void collect_garbage(bool force = false);
protected:
resource_manager_type m_resource_manager;
private:
std::vector<store_type::iterator_type::value_type> m_mesh_buffer;
std::vector<GLuint> m_buffer_id_buffer;
};
}