This commit is contained in:
ZY4N
2025-03-25 15:57:32 +01:00
parent a78be71e34
commit 70893c083b
24 changed files with 78 additions and 64 deletions

View File

@@ -4,9 +4,9 @@
#include "opengl/error.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))
{

View File

@@ -5,9 +5,9 @@
#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))
{
@@ -62,9 +62,9 @@ void zgl::mesh_vertex_buffer_manager::process(store_type& store)
continue;
}
const auto meta = mesh_vertex_buffer_metadata{
auto meta = mesh_vertex_buffer_metadata{
.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);

View File

@@ -5,9 +5,9 @@
#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))
{

View File

@@ -258,7 +258,7 @@ bool zgl::shader_manager::compile_shader(
}
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);
}

View File

@@ -25,9 +25,9 @@ struct prioritized_metadata_comparator
};
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(

View File

@@ -77,11 +77,11 @@ private:
void zgl::shader_source_manager::process(
const assets::shader_source_store& shader_sources
const assets::data_stores& stores
) {
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_declaration_token_count_buffer.clear();

View File

@@ -6,11 +6,11 @@
void zgl::texture_manager::process(
dynamic_texture_store& store
const assets::data_stores& stores
) {
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))
{
@@ -33,7 +33,7 @@ void zgl::texture_manager::process(
GLenum format;
switch (texture.components()) {
using enum texture_components::flags;
using enum assets::texture_components::flags;
case luminance:
format = GL_LUMINANCE;
break;