rubbish
This commit is contained in:
@@ -166,7 +166,7 @@ add_executable(z3d main.cpp
|
|||||||
source/assets/file_parsers/generic/generic_3dtk_loader.ipp
|
source/assets/file_parsers/generic/generic_3dtk_loader.ipp
|
||||||
include/assets/prefetch_lookup.hpp
|
include/assets/prefetch_lookup.hpp
|
||||||
source/assets/prefetch_lookups/pose_prefetch_lookup.cpp
|
source/assets/prefetch_lookups/pose_prefetch_lookup.cpp
|
||||||
include/assets/dynamic_data_store.hpp
|
include/assets/data_stores.hpp
|
||||||
include/opengl/metadata/shader_source_metadata.hpp
|
include/opengl/metadata/shader_source_metadata.hpp
|
||||||
source/opengl/data_managers/shader_manager.cpp
|
source/opengl/data_managers/shader_manager.cpp
|
||||||
include/opengl/shading/model_geometry.hpp
|
include/opengl/shading/model_geometry.hpp
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
#include "assets/components/texture_components.hpp"
|
#include "assets/components/texture_components.hpp"
|
||||||
#include "assets/data/texture_data.hpp"
|
#include "assets/data/texture_data.hpp"
|
||||||
#include "assets/data_stores/texture_store.hpp"
|
#include "assets/data_stores/texture_store.hpp"
|
||||||
#include "assets/dynamic_data_store.hpp"
|
#include "assets/data_stores.hpp"
|
||||||
#include "assets/prefetch_queue.hpp"
|
#include "assets/prefetch_queue.hpp"
|
||||||
#include "assets/prefetch_lookups/texture_prefetch_lookup.hpp"
|
#include "assets/prefetch_lookups/texture_prefetch_lookup.hpp"
|
||||||
#include "util/string_list.hpp"
|
#include "util/string_list.hpp"
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
namespace assets
|
namespace assets
|
||||||
{
|
{
|
||||||
|
|
||||||
struct dynamic_data_store
|
struct data_stores
|
||||||
{
|
{
|
||||||
material_library_store material_libraries;
|
material_library_store material_libraries;
|
||||||
material_store materials;
|
material_store materials;
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "assets/dynamic_data_store.hpp"
|
#include "assets/data_stores.hpp"
|
||||||
#include "assets/prefetch_lookup.hpp"
|
#include "assets/prefetch_lookup.hpp"
|
||||||
#include "assets/prefetch_queue.hpp"
|
#include "assets/prefetch_queue.hpp"
|
||||||
#include "assets/prefetch_lookups/mesh_prefetch_lookup.hpp"
|
#include "assets/prefetch_lookups/mesh_prefetch_lookup.hpp"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
#include <span>
|
#include <span>
|
||||||
|
|
||||||
#include "assets/dynamic_data_store.hpp"
|
#include "assets/data_stores.hpp"
|
||||||
#include "assets/components/point_cloud_vertex_components.hpp"
|
#include "assets/components/point_cloud_vertex_components.hpp"
|
||||||
#include "assets/data/point_cloud_data.hpp"
|
#include "assets/data/point_cloud_data.hpp"
|
||||||
#include "assets/data_stores/point_cloud_store.hpp"
|
#include "assets/data_stores/point_cloud_store.hpp"
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
|
|
||||||
#include "assets/dynamic_data_store.hpp"
|
#include "assets/data_stores.hpp"
|
||||||
#include "assets/prefetch_lookup.hpp"
|
#include "assets/prefetch_lookup.hpp"
|
||||||
#include "assets/prefetch_queue.hpp"
|
#include "assets/prefetch_queue.hpp"
|
||||||
#include "util/string_list.hpp"
|
#include "util/string_list.hpp"
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
#include <system_error>
|
#include <system_error>
|
||||||
|
|
||||||
#include "assets/dynamic_data_store.hpp"
|
#include "assets/data_stores.hpp"
|
||||||
#include "assets/prefetch_lookup.hpp"
|
#include "assets/prefetch_lookup.hpp"
|
||||||
#include "assets/prefetch_queue.hpp"
|
#include "assets/prefetch_queue.hpp"
|
||||||
#include "assets/data"
|
#include "assets/data"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
#include <system_error>
|
#include <system_error>
|
||||||
#include <string_view>
|
#include <string_view>
|
||||||
|
|
||||||
#include "assets/dynamic_data_store.hpp"
|
#include "assets/data_stores.hpp"
|
||||||
#include "assets/data"
|
#include "assets/data"
|
||||||
#include "../data_stores"
|
#include "../data_stores"
|
||||||
#include "assets/prefetch_lookup.hpp"
|
#include "assets/prefetch_lookup.hpp"
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
|
|
||||||
#include "assets/dynamic_data_store.hpp"
|
#include "assets/data_stores.hpp"
|
||||||
#include "assets/prefetch_lookup.hpp"
|
#include "assets/prefetch_lookup.hpp"
|
||||||
#include "assets/prefetch_queue.hpp"
|
#include "assets/prefetch_queue.hpp"
|
||||||
#include "assets/data"
|
#include "assets/data"
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "../../assets/data_stores"
|
#include "assets/data_stores.hpp"
|
||||||
|
#include "assets/data_stores/mesh_store.hpp"
|
||||||
#include "opengl/resource_management/resource_manager.hpp"
|
#include "opengl/resource_management/resource_manager.hpp"
|
||||||
#include "opengl/handles/index_buffer_handle.hpp"
|
#include "opengl/handles/index_buffer_handle.hpp"
|
||||||
#include "opengl/metadata/index_buffer_metadata.hpp"
|
#include "opengl/metadata/index_buffer_metadata.hpp"
|
||||||
@@ -10,7 +11,7 @@ namespace zgl
|
|||||||
class mesh_index_buffer_manager
|
class mesh_index_buffer_manager
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
using store_type = dynamic_mesh_store;
|
using store_type = assets::mesh_store;
|
||||||
using store_id_type = store_type::id_type;
|
using store_id_type = store_type::id_type;
|
||||||
using metadata_type = index_buffer_metadata;
|
using metadata_type = index_buffer_metadata;
|
||||||
using handle_type = index_buffer_handle;
|
using handle_type = index_buffer_handle;
|
||||||
@@ -19,7 +20,7 @@ public:
|
|||||||
|
|
||||||
static constexpr std::size_t min_garbage_collection_count = 4;
|
static constexpr std::size_t min_garbage_collection_count = 4;
|
||||||
|
|
||||||
void process(store_type& store);
|
void process(const assets::data_stores& stores);
|
||||||
|
|
||||||
std::optional<entry_type> get_handle(store_id_type id);
|
std::optional<entry_type> get_handle(store_id_type id);
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
|
||||||
|
#include "assets/data_stores.hpp"
|
||||||
#include "assets/data_stores/mesh_store.hpp"
|
#include "assets/data_stores/mesh_store.hpp"
|
||||||
#include "opengl/resource_management/resource_manager.hpp"
|
#include "opengl/resource_management/resource_manager.hpp"
|
||||||
#include "opengl/handles/vertex_buffer_handle.hpp"
|
#include "opengl/handles/vertex_buffer_handle.hpp"
|
||||||
@@ -20,7 +21,7 @@ public:
|
|||||||
|
|
||||||
static constexpr std::size_t min_garbage_collection_count = 4;
|
static constexpr std::size_t min_garbage_collection_count = 4;
|
||||||
|
|
||||||
void process(store_type& store);
|
void process(const assets::data_stores& stores);
|
||||||
|
|
||||||
std::optional<entry_type> get_handle(store_id_type id);
|
std::optional<entry_type> get_handle(store_id_type id);
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include "assets/data_stores.hpp"
|
||||||
#include "assets/data_stores/point_cloud_store.hpp"
|
#include "assets/data_stores/point_cloud_store.hpp"
|
||||||
#include "opengl/resource_management/resource_manager.hpp"
|
#include "opengl/resource_management/resource_manager.hpp"
|
||||||
#include "opengl/handles/vertex_buffer_handle.hpp"
|
#include "opengl/handles/vertex_buffer_handle.hpp"
|
||||||
@@ -20,7 +21,7 @@ public:
|
|||||||
|
|
||||||
static constexpr std::size_t min_garbage_collection_count = 4;
|
static constexpr std::size_t min_garbage_collection_count = 4;
|
||||||
|
|
||||||
void process(store_type& store);
|
void process(const assets::data_stores& stores);
|
||||||
|
|
||||||
std::optional<entry_type> get_handle(store_id_type id);
|
std::optional<entry_type> get_handle(store_id_type id);
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
#include "opengl/handles/shader_handle.hpp"
|
#include "opengl/handles/shader_handle.hpp"
|
||||||
#include "util/string_lookup.hpp"
|
#include "util/string_lookup.hpp"
|
||||||
#include "shader_source_manager.hpp"
|
#include "shader_source_manager.hpp"
|
||||||
|
#include "assets/data_stores.hpp"
|
||||||
#include "opengl/metadata/shader_metadata.hpp"
|
#include "opengl/metadata/shader_metadata.hpp"
|
||||||
#include "opengl/data/shader_data.hpp"
|
#include "opengl/data/shader_data.hpp"
|
||||||
#include "opengl/handles/shader_handle_set.hpp"
|
#include "opengl/handles/shader_handle_set.hpp"
|
||||||
@@ -22,12 +23,15 @@ namespace zgl
|
|||||||
{
|
{
|
||||||
class shader_manager
|
class shader_manager
|
||||||
{
|
{
|
||||||
using shader_lookup_entry_type = std::pair<shader_metadata, shader_data>;
|
using metadata_type = shader_metadata;
|
||||||
|
using data_type = shader_data;
|
||||||
|
using handle_type = shader_handle;
|
||||||
|
using entry_type = std::pair<metadata_type, data_type>;
|
||||||
|
using entry_view_type = std::pair<metadata_type, handle_type>;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
void process(
|
void process(const assets::data_stores& stores);
|
||||||
const assets::shader_source_store& shader_sources
|
|
||||||
);
|
|
||||||
|
|
||||||
void get_handles(
|
void get_handles(
|
||||||
const assets::shader_source_store& shader_sources,
|
const assets::shader_source_store& shader_sources,
|
||||||
@@ -37,7 +41,7 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
std::optional<std::pair<shader_metadata, shader_handle>> find_shader(
|
std::optional<entry_view_type> find_shader(
|
||||||
const shading::shader_requirements& requirements
|
const shading::shader_requirements& requirements
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -47,12 +51,13 @@ protected:
|
|||||||
shader_data& shader
|
shader_data& shader
|
||||||
);
|
);
|
||||||
|
|
||||||
private:
|
|
||||||
shader_source_manager m_preprocessor{};
|
|
||||||
|
|
||||||
|
shader_source_manager m_preprocessor{};
|
||||||
|
std::vector<entry_type> m_shader_lookup{};
|
||||||
|
|
||||||
|
private:
|
||||||
std::vector<shading::shader_source_requirements> m_source_requirement_buffer{};
|
std::vector<shading::shader_source_requirements> m_source_requirement_buffer{};
|
||||||
std::vector<preprocessed_shader_source_metadata> m_preprocessed_shader_source_metadata_buffer{};
|
std::vector<preprocessed_shader_source_metadata> m_preprocessed_shader_source_metadata_buffer{};
|
||||||
std::vector<const char*> m_source_strings_buffer{};
|
std::vector<const char*> m_source_strings_buffer{};
|
||||||
std::vector<shader_lookup_entry_type> m_shader_lookup{};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,15 +11,14 @@ namespace zgl
|
|||||||
|
|
||||||
class shader_program_manager
|
class shader_program_manager
|
||||||
{
|
{
|
||||||
using shader_program_lookup_entry_type = std::pair<
|
|
||||||
shader_program_metadata,
|
|
||||||
shader_program_data
|
|
||||||
>;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void process(
|
using metadata_type = shader_program_metadata;
|
||||||
const assets::shader_source_store& shader_sources
|
using data_type = shader_program_data;
|
||||||
);
|
using handle_type = shader_program_handle;
|
||||||
|
using entry_type = std::pair<metadata_type, data_type>;
|
||||||
|
using entry_view_type = std::pair<metadata_type, handle_type>;
|
||||||
|
|
||||||
|
void process(const assets::data_stores& stores);
|
||||||
|
|
||||||
void get_handles(
|
void get_handles(
|
||||||
const assets::shader_source_store& shader_sources,
|
const assets::shader_source_store& shader_sources,
|
||||||
@@ -29,7 +28,7 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
std::optional<std::pair<shader_program_metadata, shader_program_handle>> find_shader_program(
|
std::optional<entry_view_type> find_shader_program(
|
||||||
const shading::shader_program_requirements& requirements
|
const shading::shader_program_requirements& requirements
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -38,10 +37,9 @@ protected:
|
|||||||
);
|
);
|
||||||
|
|
||||||
shader_manager m_shader_manager;
|
shader_manager m_shader_manager;
|
||||||
std::vector<shader_program_lookup_entry_type> m_shader_program_lookup;
|
std::vector<entry_type> m_shader_program_lookup;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
std::vector<shading::shader_set_requirements> m_shader_requirements_buffer;
|
std::vector<shading::shader_set_requirements> m_shader_requirements_buffer;
|
||||||
std::vector<shader_set_metadata> m_shader_metadata_buffer;
|
std::vector<shader_set_metadata> m_shader_metadata_buffer;
|
||||||
std::vector<shader_handle_set> shader_set_buffer;
|
std::vector<shader_handle_set> shader_set_buffer;
|
||||||
|
|||||||
@@ -4,6 +4,8 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
#include <optional>
|
#include <optional>
|
||||||
#include <span>
|
#include <span>
|
||||||
|
|
||||||
|
#include "assets/data_stores.hpp"
|
||||||
#include "util/string_lookup.hpp"
|
#include "util/string_lookup.hpp"
|
||||||
|
|
||||||
#include "opengl/metadata/shader_source_metadata.hpp"
|
#include "opengl/metadata/shader_source_metadata.hpp"
|
||||||
@@ -18,9 +20,15 @@ namespace zgl {
|
|||||||
class shader_source_manager {
|
class shader_source_manager {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void process(
|
using store_type = assets::shader_source_store;
|
||||||
const assets::shader_source_store& shader_sources
|
using store_id_type = store_type::id_type;
|
||||||
);
|
using metadata_type = shader_source_metadata;
|
||||||
|
using data_type = char*;
|
||||||
|
using handle_type = const char*;
|
||||||
|
using entry_type = std::pair<metadata_type, store_id_type>;
|
||||||
|
using entry_view_type = std::pair<preprocessed_shader_source_metadata, handle_type>;
|
||||||
|
|
||||||
|
void process(const assets::data_stores& stores);
|
||||||
|
|
||||||
void get_shader_sources(
|
void get_shader_sources(
|
||||||
const assets::shader_source_store& shader_sources,
|
const assets::shader_source_store& shader_sources,
|
||||||
@@ -74,14 +82,12 @@ protected:
|
|||||||
std::vector<const char*>& defines
|
std::vector<const char*>& defines
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
std::vector<entry_type> m_shader_source_lookup;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::vector<std::string_view> m_value_token_buffer;
|
std::vector<std::string_view> m_value_token_buffer;
|
||||||
std::vector<std::size_t> m_declaration_token_count_buffer;
|
std::vector<std::size_t> m_declaration_token_count_buffer;
|
||||||
std::array<std::size_t, 4> m_declaration_type_index_buffer;
|
std::array<std::size_t, 4> m_declaration_type_index_buffer;
|
||||||
|
|
||||||
using source_lookup_entry_type = std::pair<shader_source_metadata, assets::shader_source_store::id_type>;
|
|
||||||
using source_lookup_type = std::vector<source_lookup_entry_type>;
|
|
||||||
|
|
||||||
source_lookup_type m_shader_source_lookup;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,11 +2,12 @@
|
|||||||
|
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
|
|
||||||
#include "../../assets/read_buffers"
|
#include "assets/data/texture_data.hpp"
|
||||||
#include "../../assets/data_stores"
|
#include "assets/data_stores/texture_store.hpp"
|
||||||
#include "opengl/handles/texture_handle.hpp"
|
#include "opengl/handles/texture_handle.hpp"
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#include "assets/data_stores.hpp"
|
||||||
#include "opengl/metadata/texture_metadata.hpp"
|
#include "opengl/metadata/texture_metadata.hpp"
|
||||||
#include "opengl/resource_management/resource_manager.hpp"
|
#include "opengl/resource_management/resource_manager.hpp"
|
||||||
|
|
||||||
@@ -15,7 +16,7 @@ namespace zgl
|
|||||||
class texture_manager
|
class texture_manager
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
using store_type = dynamic_texture_store;
|
using store_type = assets::texture_store;
|
||||||
using store_id_type = store_type::id_type;
|
using store_id_type = store_type::id_type;
|
||||||
using metadata_type = texture_metadata;
|
using metadata_type = texture_metadata;
|
||||||
using handle_type = texture_handle;
|
using handle_type = texture_handle;
|
||||||
@@ -24,7 +25,7 @@ public:
|
|||||||
|
|
||||||
static constexpr std::size_t min_garbage_collection_count = 4;
|
static constexpr std::size_t min_garbage_collection_count = 4;
|
||||||
|
|
||||||
void process(store_type& store);
|
void process(const assets::data_stores& stores);
|
||||||
|
|
||||||
std::optional<entry_type> get_handle(store_id_type id);
|
std::optional<entry_type> get_handle(store_id_type id);
|
||||||
|
|
||||||
@@ -34,7 +35,7 @@ protected:
|
|||||||
resource_manager_type m_resource_manager;
|
resource_manager_type m_resource_manager;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::vector<std::pair<dynamic_texture_store::id_type, const dynamic_texture_buffer&>> m_texture_buffer;
|
std::vector<std::pair<store_id_type, const assets::texture_data&>> m_texture_buffer;
|
||||||
std::vector<GLuint> m_texture_id_buffer;
|
std::vector<GLuint> m_texture_id_buffer;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
#include "assets/components/mesh_vertex_components.hpp"
|
#include "assets/components/mesh_vertex_components.hpp"
|
||||||
#include "assets/data_stores/material_store.hpp"
|
#include "assets/data_stores/material_store.hpp"
|
||||||
|
#include "opengl/handles/material_handle.hpp"
|
||||||
|
|
||||||
namespace zgl
|
namespace zgl
|
||||||
{
|
{
|
||||||
@@ -9,7 +10,7 @@ namespace zgl
|
|||||||
struct mesh_vertex_buffer_metadata
|
struct mesh_vertex_buffer_metadata
|
||||||
{
|
{
|
||||||
assets::mesh_vertex_components::flags component_flags;
|
assets::mesh_vertex_components::flags component_flags;
|
||||||
assets::material_store::id_type material_id{};
|
material_handle material{};
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,9 +4,9 @@
|
|||||||
#include "opengl/error.hpp"
|
#include "opengl/error.hpp"
|
||||||
#include "opengl/type_utils.hpp"
|
#include "opengl/type_utils.hpp"
|
||||||
|
|
||||||
void zgl::mesh_index_buffer_manager::process(store_type& store)
|
void zgl::mesh_index_buffer_manager::process(const assets::data_stores& stores)
|
||||||
{
|
{
|
||||||
for (const auto& [ id, mesh ] : store)
|
for (const auto& [ id, mesh ] : stores.meshes)
|
||||||
{
|
{
|
||||||
if (not m_resource_manager.has_resource(id))
|
if (not m_resource_manager.has_resource(id))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -5,9 +5,9 @@
|
|||||||
#include "opengl/vertex_buffer_utils.hpp"
|
#include "opengl/vertex_buffer_utils.hpp"
|
||||||
|
|
||||||
|
|
||||||
void zgl::mesh_vertex_buffer_manager::process(store_type& store)
|
void zgl::mesh_vertex_buffer_manager::process(const assets::data_stores& stores)
|
||||||
{
|
{
|
||||||
for (const auto& [ id, mesh ] : store)
|
for (const auto& [ id, mesh ] : stores.meshes)
|
||||||
{
|
{
|
||||||
if (not m_resource_manager.has_resource(id))
|
if (not m_resource_manager.has_resource(id))
|
||||||
{
|
{
|
||||||
@@ -62,9 +62,9 @@ void zgl::mesh_vertex_buffer_manager::process(store_type& store)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto meta = mesh_vertex_buffer_metadata{
|
auto meta = mesh_vertex_buffer_metadata{
|
||||||
.component_flags = mesh.component_flags,
|
.component_flags = mesh.component_flags,
|
||||||
.material_id = mesh.material_id
|
.material = stores.materials.find(mesh.material_id)
|
||||||
};
|
};
|
||||||
|
|
||||||
m_resource_manager.add_resource(store_id, buffer_id, meta);
|
m_resource_manager.add_resource(store_id, buffer_id, meta);
|
||||||
|
|||||||
@@ -5,9 +5,9 @@
|
|||||||
#include "opengl/vertex_buffer_utils.hpp"
|
#include "opengl/vertex_buffer_utils.hpp"
|
||||||
|
|
||||||
|
|
||||||
void zgl::point_cloud_vertex_buffer_manager::process(store_type& store)
|
void zgl::point_cloud_vertex_buffer_manager::process(const assets::data_stores& stores)
|
||||||
{
|
{
|
||||||
for (const auto& [ id, point_cloud ] : store)
|
for (const auto& [ id, point_cloud ] : stores.point_clouds)
|
||||||
{
|
{
|
||||||
if (not m_resource_manager.has_resource(id))
|
if (not m_resource_manager.has_resource(id))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -258,7 +258,7 @@ bool zgl::shader_manager::compile_shader(
|
|||||||
}
|
}
|
||||||
|
|
||||||
void zgl::shader_manager::process(
|
void zgl::shader_manager::process(
|
||||||
const assets::shader_source_store& shader_sources
|
const assets::data_stores& stores
|
||||||
) {
|
) {
|
||||||
m_preprocessor.process(shader_sources);
|
m_preprocessor.process(stores);
|
||||||
}
|
}
|
||||||
@@ -25,9 +25,9 @@ struct prioritized_metadata_comparator
|
|||||||
};
|
};
|
||||||
|
|
||||||
void zgl::shader_program_manager::process(
|
void zgl::shader_program_manager::process(
|
||||||
const assets::shader_source_store& shader_sources
|
const assets::data_stores& stores
|
||||||
) {
|
) {
|
||||||
m_shader_manager.preprocess(shader_sources);
|
m_shader_manager.preprocess(stores);
|
||||||
}
|
}
|
||||||
|
|
||||||
void zgl::shader_program_manager::get_handles(
|
void zgl::shader_program_manager::get_handles(
|
||||||
|
|||||||
@@ -77,11 +77,11 @@ private:
|
|||||||
|
|
||||||
|
|
||||||
void zgl::shader_source_manager::process(
|
void zgl::shader_source_manager::process(
|
||||||
const assets::shader_source_store& shader_sources
|
const assets::data_stores& stores
|
||||||
) {
|
) {
|
||||||
namespace language = shading::shader_metadata_language;
|
namespace language = shading::shader_metadata_language;
|
||||||
|
|
||||||
for (const auto& [ id, shader_source ] : shader_sources)
|
for (const auto& [ id, shader_source ] : stores.shader_sources)
|
||||||
{
|
{
|
||||||
m_value_token_buffer.clear();
|
m_value_token_buffer.clear();
|
||||||
m_declaration_token_count_buffer.clear();
|
m_declaration_token_count_buffer.clear();
|
||||||
|
|||||||
@@ -6,11 +6,11 @@
|
|||||||
|
|
||||||
|
|
||||||
void zgl::texture_manager::process(
|
void zgl::texture_manager::process(
|
||||||
dynamic_texture_store& store
|
const assets::data_stores& stores
|
||||||
) {
|
) {
|
||||||
m_texture_buffer.clear();
|
m_texture_buffer.clear();
|
||||||
|
|
||||||
for (const auto& [ id, texture ] : store)
|
for (const auto& [ id, texture ] : stores.textures)
|
||||||
{
|
{
|
||||||
if (not m_resource_manager.has_resource(id))
|
if (not m_resource_manager.has_resource(id))
|
||||||
{
|
{
|
||||||
@@ -33,7 +33,7 @@ void zgl::texture_manager::process(
|
|||||||
|
|
||||||
GLenum format;
|
GLenum format;
|
||||||
switch (texture.components()) {
|
switch (texture.components()) {
|
||||||
using enum texture_components::flags;
|
using enum assets::texture_components::flags;
|
||||||
case luminance:
|
case luminance:
|
||||||
format = GL_LUMINANCE;
|
format = GL_LUMINANCE;
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user