Started refactor to lazily compilable shaders.
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
#include <tuple>
|
||||
#include "../dynamic_read_buffers"
|
||||
#include "assets/data/surface_properties.hpp"
|
||||
#include "util/enum_operators.hpp"
|
||||
#include "util/enum_bitfield_operators.hpp"
|
||||
|
||||
namespace components::material
|
||||
{
|
||||
@@ -56,4 +56,4 @@ constexpr inline auto count = std::tuple_size_v<all>;
|
||||
|
||||
} // namespace material_component
|
||||
|
||||
DEFINE_ENUM_FLAG_OPERATORS(components::material::flags)
|
||||
DEFINE_ENUM_BITFIELD_OPERATORS(components::material::flags)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include <array>
|
||||
#include <tuple>
|
||||
#include "util/enum_operators.hpp"
|
||||
#include "util/enum_bitfield_operators.hpp"
|
||||
|
||||
namespace components::mesh_vertex {
|
||||
|
||||
@@ -36,4 +36,4 @@ constexpr inline auto count = std::tuple_size_v<all>;
|
||||
|
||||
} // namespace components::mesh_vertex
|
||||
|
||||
DEFINE_ENUM_FLAG_OPERATORS(components::mesh_vertex::flags)
|
||||
DEFINE_ENUM_BITFIELD_OPERATORS(components::mesh_vertex::flags)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include <array>
|
||||
#include <tuple>
|
||||
#include "util/enum_operators.hpp"
|
||||
#include "util/enum_bitfield_operators.hpp"
|
||||
|
||||
namespace components::point_cloud_vertex {
|
||||
|
||||
@@ -33,4 +33,4 @@ constexpr inline auto count = std::tuple_size_v<all>;
|
||||
|
||||
} // namespace components::point_cloud_vertex
|
||||
|
||||
DEFINE_ENUM_FLAG_OPERATORS(components::point_cloud_vertex::flags)
|
||||
DEFINE_ENUM_BITFIELD_OPERATORS(components::point_cloud_vertex::flags)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include <tuple>
|
||||
#include <cinttypes>
|
||||
#include "util/enum_operators.hpp"
|
||||
#include "util/enum_bitfield_operators.hpp"
|
||||
|
||||
namespace components::texture {
|
||||
|
||||
@@ -25,4 +25,4 @@ constexpr inline auto count = std::tuple_size_v<all>;
|
||||
|
||||
} // namespace components::texture
|
||||
|
||||
DEFINE_ENUM_FLAG_OPERATORS(components::texture::flags)
|
||||
DEFINE_ENUM_BITFIELD_OPERATORS(components::texture::flags)
|
||||
@@ -24,7 +24,7 @@ struct glsl_loader
|
||||
dynamic_shader_buffer& buffer,
|
||||
const file_dir_list& paths,
|
||||
prefetch_lookup& id_lookup,
|
||||
dynamic_data_store& store,
|
||||
dynamic_shader_source_store& store,
|
||||
bool pedantic = false
|
||||
);
|
||||
};
|
||||
@@ -26,7 +26,7 @@ struct kitti_loader
|
||||
dynamic_point_cloud_buffer& buffer,
|
||||
const file_dir_list& paths,
|
||||
prefetch_lookup& id_lookup,
|
||||
dynamic_data_store& store,
|
||||
dynamic_shader_source_store& store,
|
||||
bool pedantic = false
|
||||
);
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ struct kitti_pose_loader
|
||||
dynamic_pose_buffer& buffer,
|
||||
const file_dir_list& paths,
|
||||
prefetch_lookup& id_lookup,
|
||||
dynamic_data_store& store,
|
||||
dynamic_shader_source_store& store,
|
||||
bool pedantic = false
|
||||
);
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ struct mtl_loader
|
||||
dynamic_material_library_buffer& material_library_buffer,
|
||||
const file_dir_list& paths,
|
||||
prefetch_lookup& id_lookup,
|
||||
dynamic_data_store& store,
|
||||
dynamic_shader_source_store& store,
|
||||
bool pedantic = false
|
||||
);
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ struct obj_loader {
|
||||
dynamic_mesh_buffer& buffer,
|
||||
const file_dir_list& paths,
|
||||
prefetch_lookup& id_lookup,
|
||||
dynamic_data_store& store,
|
||||
dynamic_shader_source_store& store,
|
||||
bool pedantic = false
|
||||
);
|
||||
|
||||
@@ -76,7 +76,7 @@ protected:
|
||||
std::set<indexed_vertex_type>& vertex_ids,
|
||||
std::ifstream& in,
|
||||
prefetch_lookup& id_lookup,
|
||||
dynamic_data_store& store,
|
||||
dynamic_shader_source_store& store,
|
||||
bool pedantic
|
||||
);
|
||||
};
|
||||
|
||||
@@ -24,7 +24,7 @@ struct stl_loader {
|
||||
dynamic_mesh_buffer& buffer,
|
||||
const file_dir_list& paths,
|
||||
prefetch_lookup& id_lookup,
|
||||
dynamic_data_store& store,
|
||||
dynamic_shader_source_store& store,
|
||||
bool pedantic = false
|
||||
);
|
||||
};
|
||||
|
||||
@@ -23,7 +23,7 @@ struct threedtk_pose_loader
|
||||
dynamic_pose_buffer& buffer,
|
||||
const file_dir_list& paths,
|
||||
prefetch_lookup& id_lookup,
|
||||
dynamic_data_store& store,
|
||||
dynamic_shader_source_store& store,
|
||||
bool pedantic = false
|
||||
);
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include "dynamic_data_stores/dynamic_mesh_store.hpp"
|
||||
#include "dynamic_data_stores/dynamic_point_cloud_store.hpp"
|
||||
#include "dynamic_data_stores/dynamic_pose_store.hpp"
|
||||
#include "dynamic_data_stores/dynamic_shader_store.hpp"
|
||||
#include "dynamic_data_stores/dynamic_shader_source_store.hpp"
|
||||
#include "dynamic_data_stores/dynamic_texture_store.hpp"
|
||||
|
||||
struct dynamic_data_store
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "generic/generic_dynamic_store.hpp"
|
||||
#include "assets/dynamic_read_buffers/dynamic_shader_buffer.hpp"
|
||||
|
||||
// TODO use compressed store where all shaders are condensed into one vector
|
||||
using dynamic_shader_source_store = generic_dynamic_store<dynamic_shader_buffer>;
|
||||
@@ -1,9 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include "generic/generic_dynamic_store.hpp"
|
||||
#include "glm/mat4x4.hpp"
|
||||
|
||||
class dynamic_shader_store {
|
||||
|
||||
|
||||
};
|
||||
Reference in New Issue
Block a user