class
render::Variation
Render thread version of Variation.
Public
Constructors
Variation
Variation(const WeakSPtr<Shader> &owner, const String &language, const ShaderVariationParameters &variationParameters, const TOptional<PrecompiledVariationData> &precompiledData)
Methods
staticCreate
static SPtr<Variation> Create(const WeakSPtr<Shader> &owner, const String &language, const ShaderVariationParameters &variationParameters, const TOptional<PrecompiledVariationData> &precompiledData = {})
Creates a new variation.
- owner
- Shader that owns the variation.
- language
- Shading language used by the variation. The engine will not use this variation unless this language is supported by the render backend.
- variationParameters
- Variation parameters used for compiling this variation.
- precompiledData
- Optional set of precompiled variation data. If not provided, you must manually call Compile() on the variation before use.
Returns: Newly creted variation.
staticGetRttiStatic
static RTTIType *GetRttiStatic()
~TVariation<IsRenderProxy>
virtual ~TVariation<IsRenderProxy>() = default
GetPass
SPtr<PassType> GetPass(u32 passIndex) const
Returns a pass with the specified index.
GetPassCount
u32 GetPassCount() const
Returns total number of passes.
Compile
TAsyncOp<bool> Compile()
Compiles the variation in case it was not initialized with precompiled data.
IsCompiled
bool IsCompiled() const
Returns true if the variation has been fully compiled.
Internal
Methods
SetCompiledPassData
void SetCompiledPassData(TInlineArray<SPtr<PassType>, 1> compiledPasses)
Assigns a set of compiled passes to the variation.
This should be called only when a variation has not been initialized with precompiled pass data, and compilation for the variation finished.
SetOwner
void SetOwner(const WeakSPtr<ShaderType> &owner)
Sets the shader that owns this variation.
Protected
Methods
SyncFromCoreObject
Update internal data from provided memory buffer that was populated with data from the owning CoreObject.
GetSelf
SPtr<Variation> GetSelf() override
Returns a reference to itself using the most derived type.
Fields
mOwner
WeakSPtr<ShaderType> mOwner
mPasses
TInlineArray<SPtr<PassType>, 1> mPasses
mHasPassData
bool mHasPassData
mIsCompiled
bool mIsCompiled
Private
Constructors
Variation
Variation()
Serialization only constructor.