...
This commit is contained in:
32
include/opengl/data_managers/mesh_vertex_buffer_manager.hpp
Normal file
32
include/opengl/data_managers/mesh_vertex_buffer_manager.hpp
Normal file
@@ -0,0 +1,32 @@
|
||||
#pragma once
|
||||
|
||||
|
||||
#include "assets/dynamic_data_stores/dynamic_mesh_store.hpp"
|
||||
#include "opengl/resource_management/resource_manager.hpp"
|
||||
#include "opengl/handles/vertex_buffer_handle.hpp"
|
||||
#include "opengl/metadata/vertex_buffer_metadata.hpp"
|
||||
|
||||
namespace zgl
|
||||
{
|
||||
class mesh_vertex_buffer_manager
|
||||
{
|
||||
public:
|
||||
using store_type = dynamic_mesh_store;
|
||||
using store_id_type = store_type::id_type;
|
||||
using metadata_type = vertex_buffer_metadata;
|
||||
using handle_type = vertex_buffer_handle;
|
||||
using resource_manager_type = resource_manager<store_id_type, metadata_type>;
|
||||
using texture_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<texture_entry_type> get_handle(store_id_type id);
|
||||
|
||||
void collect_garbage(bool force = false);
|
||||
|
||||
private:
|
||||
resource_manager_type m_resource_manager;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user