tried making naming more uniform and implemented most of the opengl managers
This commit is contained in:
@@ -3,43 +3,47 @@
|
||||
#include <filesystem>
|
||||
#include <unordered_map>
|
||||
|
||||
#include "assets/dynamic_data_stores/dynamic_pose_store.hpp"
|
||||
#include "util/uix.hpp"
|
||||
#include "assets/data_stores/pose_store.hpp"
|
||||
|
||||
class pose_prefetch_lookup {
|
||||
namespace assets
|
||||
{
|
||||
|
||||
class pose_prefetch_lookup
|
||||
{
|
||||
public:
|
||||
using index_type = ztu::u32;
|
||||
using directory_lookup = std::unordered_map<std::filesystem::path, index_type>;
|
||||
using directory_iterator = std::pair<directory_lookup::iterator, index_type>;
|
||||
using index_lookup = std::vector<index_type>;
|
||||
using index_iterator = index_lookup::iterator;
|
||||
using lookup_type = std::vector<dynamic_pose_store::id_type>;
|
||||
using lookup_type = std::vector<pose_store::id_type>;
|
||||
using iterator = lookup_type::iterator;
|
||||
|
||||
void emplace(
|
||||
const std::filesystem::path& directory,
|
||||
index_type index,
|
||||
dynamic_pose_store::id_type id
|
||||
pose_store::id_type id
|
||||
);
|
||||
|
||||
void emplace_hint_dir(
|
||||
directory_iterator directory_it,
|
||||
index_type index,
|
||||
dynamic_pose_store::id_type id
|
||||
pose_store::id_type id
|
||||
);
|
||||
|
||||
void emplace_hint_dir_index(
|
||||
directory_iterator directory_it,
|
||||
index_iterator index_it,
|
||||
index_type index,
|
||||
dynamic_pose_store::id_type id
|
||||
pose_store::id_type id
|
||||
);
|
||||
|
||||
std::pair<directory_iterator, bool> find_directory(
|
||||
const std::filesystem::path& directory
|
||||
);
|
||||
|
||||
std::pair<index_iterator, dynamic_pose_store::id_type> find_index(
|
||||
std::pair<index_iterator, pose_store::id_type> find_index(
|
||||
directory_iterator directory_it,
|
||||
index_type index
|
||||
);
|
||||
@@ -54,3 +58,5 @@ private:
|
||||
index_lookup m_directory_indices; // count before indices, indices sorted per dir
|
||||
lookup_type m_pose_ids; // offset by 1
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user