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,42 @@
#pragma once
#include <optional>
#include <tuple>
#include "../../data_stores"
#include "util/uix.hpp"
#include "util/string_lookup.hpp"
#include "util/id_type.hpp"
#include "util/result.hpp"
template<typename C, class... Loaders>
class base_dynamic_loader
{
public:
using loader_id_type = ztu::id_type_for<base_dynamic_loader, ztu::u32>;
explicit base_dynamic_loader(C enabled_components);
[[nodiscard]] std::optional<loader_id_type> find_loader(std::string_view name);
[[nodiscard]] static consteval std::optional<loader_id_type> find_loader_static(std::string_view name);
template<loader_id_type ID>
auto& get_loader();
protected:
// TODO this seems like I modified this to something that does not make sense
template<typename F>
ztu::result<dynamic_point_cloud_store::id_type> invoke_with_matching_loader(loader_id_type loader_id, F&& f);
std::tuple<Loaders...> m_loaders{};
ztu::string_lookup<loader_id_type> m_loader_id_lookup{};
C m_enabled_components{ 0 };
};
#define INCLUDE_BASE_DYNAMIC_LOADER_IMPLEMENTATION
#include "../../data_loaders"
#undef INCLUDE_BASE_DYNAMIC_LOADER_IMPLEMENTATION