3#include "../Base/EffectsCommon.h"
5#include "CommonGLES30.h"
7#include "../Base/Utilities.h"
52 uint32_t currentFrame = 0;
53 uint32_t allEffectsReadyFrame = 0;
Provides a weakly referenced view over the contents of a string.
Contains all Cogs related functionality.
ResourceStatus
Status of an asynchronously loaded resource, such as an effect or a pipeline.
std::vector< PreprocessorDefinition > PreprocessorDefinitions
A set of preprocessor definitions.
Contains an effect description used to load a single effect.
EEffectFlags
Effect source flags.
SamplerStateBindingHandle getSamplerStateBinding(EffectHandle effectHandle, const StringView &name, const unsigned int slot) override
Get a handle to a sampler state object binding, mapping how to bind the sampler state to the given ef...
EffectVariableHandle getEffectVariable(EffectHandle effectHandle, const StringView &name) override
Get a handle to the variable with the given name in the effect with the given effectHandle.
void beginFrame()
Advances the frame counter used to simulate asynchronous effect loading, see delayFrames.
virtual EffectHandle loadComputeEffect(const StringView &fileName, EffectFlags::EEffectFlags effectFlags) override
Load the compute shader with the given file name and create an effect.
uint32_t delayFrames
Number of frames to delay effect readiness by, simulating asynchronous loading.
ResourceStatus checkEffect(EffectHandle effectHandle) override
Check the load status of the effect with the given effectHandle.
void releaseResources()
Release all allocated effect resources.
TextureBindingHandle getTextureBinding(EffectHandle effectHandle, const StringView &name, const unsigned int slot) override
Get a handle to a texture object binding, mapping how to bind textures to the given effect.
ConstantBufferBindingHandle getConstantBufferBinding(EffectHandle effectHandle, const StringView &name) override
Get a handle to a constant buffer binding, mapping how to bind a constant buffer to the given effect.
void releaseEffect(EffectHandle handle)
Release the effect with the given handle, freeing all resources generated during program loading.