Skip to content

Commit

Permalink
asset: Remove unneeded asset dependencies (#909)
Browse files Browse the repository at this point in the history
  • Loading branch information
BastianBlokland committed Jun 26, 2024
1 parent 4981e7b commit a1ee980
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 5 deletions.
3 changes: 0 additions & 3 deletions libs/asset/src/loader_graphic.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,13 +177,11 @@ ecs_system_define(LoadGraphicAssetSys) {
// Resolve shader references.
array_ptr_for_t(graphicComp->shaders, AssetGraphicShader, ptr) {
ptr->shader = asset_lookup(world, manager, ptr->shaderId);
asset_register_dep(world, entity, ptr->shader);
}

// Resolve texture references.
array_ptr_for_t(graphicComp->samplers, AssetGraphicSampler, ptr) {
ptr->texture = asset_lookup(world, manager, ptr->textureId);
asset_register_dep(world, entity, ptr->texture);
}

// Resolve mesh reference.
Expand All @@ -193,7 +191,6 @@ ecs_system_define(LoadGraphicAssetSys) {
}
if (!string_is_empty(graphicComp->meshId)) {
graphicComp->mesh = asset_lookup(world, manager, graphicComp->meshId);
asset_register_dep(world, entity, graphicComp->mesh);
}

ecs_world_remove_t(world, entity, AssetGraphicLoadComp);
Expand Down
2 changes: 0 additions & 2 deletions libs/asset/src/loader_terrain.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,6 @@ ecs_system_define(LoadTerrainAssetSys) {
// Resolve asset references.
terrainComp->graphic = asset_lookup(world, manager, terrainComp->graphicId);
terrainComp->heightmap = asset_lookup(world, manager, terrainComp->heightmapId);
asset_register_dep(world, entity, terrainComp->graphic);
asset_register_dep(world, entity, terrainComp->heightmap);

ecs_world_remove_t(world, entity, AssetTerrainLoadComp);
ecs_world_add_empty_t(world, entity, AssetLoadedComp);
Expand Down

0 comments on commit a1ee980

Please sign in to comment.