MeshUploadSystem.ixx File
Collects active shader resources and queues batch compile commands. More...
Included Headers
#include <vector>
#include "helios-engine-config.h"
#include <helios.ecs.components.Active>
#include <helios.engine.runtime.world.UpdateContext>
#include <helios.engine.rendering.mesh.commands.MeshBatchUploadCommand>
#include <helios.engine.rendering.mesh.components.MeshUploadRequestComponent>
#include <helios.engine.rendering.mesh.components.MeshDataComponent>
#include <helios.engine.runtime.world.tags.SystemRole>
#include <helios.engine.runtime.messaging.command.concepts.IsCommandBufferLike>
#include <helios.engine.runtime.messaging.command.NullCommandBuffer>
#include <helios.engine.rendering.mesh.concepts>
Namespaces Index
| namespace | helios |
| namespace | engine |
| namespace | rendering |
| namespace | mesh |
| namespace | systems |
Classes Index
| class | MeshUploadSystem<THandle, TCommandBuffer, TCapacity> |
Description
Collects active shader resources and queues batch compile commands.
File Listing
The file content with the documentation metadata removed is:
8#include "helios-engine-config.h"
24using namespace helios::engine::rendering::mesh::commands;
25using namespace helios::engine::rendering::mesh::components;
26using namespace helios::engine::runtime::messaging::command;
27using namespace helios::engine::runtime::world;
28using namespace helios::engine::runtime::world::tags;
31export namespace helios::engine::rendering::mesh::systems {
34 template<typename THandle, typename TCommandBuffer = NullCommandBuffer, size_t TCapacity = DEFAULT_MESH_POOL_CAPACITY>
35 requires IsMeshHandle<THandle> && IsCommandBufferLike<TCommandBuffer>
36 class MeshUploadSystem {
44 using EngineRoleTag = SystemRole;
45 using CommandBuffer_type = TCommandBuffer;
47 explicit MeshUploadSystem(size_t capacity = TCapacity) : capacity_(capacity) {
48 meshHandles_.reserve(capacity);
56 void update(UpdateContext& updateContext, TCommandBuffer& cmdBuffer) noexcept {
58 for (auto [entity, mdc, murc, ac] : updateContext.view<
59 THandle,
63 >().whereEnabled()) {
64 meshHandles_.push_back(entity.handle());
67 cmdBuffer.template add<MeshBatchUploadCommand<THandle>>(std::move(meshHandles_));
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.