ShaderCompileSystem.ixx File
Collects active shader resources and queues batch compile commands. More...
Included Headers
#include <span>
#include <vector>
#include <cstddef>
#include "helios-engine-config.h"
#include <helios.ecs.components>
#include <helios.engine.runtime.messaging.command.concepts.IsCommandBufferLike>
#include <helios.engine.rendering.shader.commands>
#include <helios.engine.rendering.shader.concepts>
#include <helios.engine.rendering.shader.components>
#include <helios.engine.runtime.world.tags.SystemRole>
#include <helios.engine.runtime.messaging.command.NullCommandBuffer>
#include <helios.engine.runtime.world.UpdateContext>
#include <helios.engine.runtime.messaging.command.RenderCommandBuffer>
Namespaces Index
| namespace | helios |
| namespace | engine |
| namespace | rendering |
| namespace | shader |
| namespace | systems |
Classes Index
| class | ShaderCompileSystem<THandle, TCommandBuffer, TCapacity> |
|
System that batches shader compile requests for active shader entities. More... | |
Description
Collects active shader resources and queues batch compile commands.
File Listing
The file content with the documentation metadata removed is:
10#include "helios-engine-config.h"
28using namespace helios::engine::runtime::world::tags;
29using namespace helios::engine::runtime::world;
30using namespace helios::engine::runtime::messaging::command;
31using namespace helios::engine::rendering::shader;
33using namespace helios::engine::rendering::shader::components;
34using namespace helios::engine::rendering::shader::commands;
37export namespace helios::engine::rendering::shader::systems {
46 template<typename THandle, typename TCommandBuffer = NullCommandBuffer, size_t TCapacity = DEFAULT_SHADER_POOL_CAPACITY>
47 requires IsShaderHandle<THandle> && IsCommandBufferLike<TCommandBuffer>
48 class ShaderCompileSystem {
56 using EngineRoleTag = SystemRole;
57 using CommandBuffer_type = TCommandBuffer;
59 explicit ShaderCompileSystem(size_t capacity = TCapacity) : capacity_(capacity) {
60 shaderHandles_.reserve(capacity);
68 void update(UpdateContext& updateContext, TCommandBuffer& cmdBuffer) noexcept {
70 for (auto [entity, scc, ac] : updateContext.view<
71 THandle,
74 >().whereEnabled()) {
75 shaderHandles_.push_back(entity.handle());
78 cmdBuffer.template add<ShaderBatchCompileCommand<THandle>>(std::move(shaderHandles_));
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.