A material render proxy used by the renderer. 更多...
#include <MaterialShared.h>
类 FMaterialRenderProxy 继承关系图:Public 成员函数 | |
| void ENGINE_API | CacheUniformExpressions (bool bRecreateUniformBuffer) |
| Caches uniform expressions for efficient runtime evaluation. | |
| void ENGINE_API | CacheUniformExpressions_GameThread (bool bRecreateUniformBuffer) |
| Enqueues a rendering command to cache uniform expressions for efficient runtime evaluation. 更多... | |
| void ENGINE_API | EvaluateUniformExpressions (FUniformExpressionCache &OutUniformExpressionCache, const FMaterialRenderContext &Context, class FRHICommandList *CommandListIfLocalMode=nullptr) const |
| Evaluates uniform expressions and stores them in OutUniformExpressionCache. 更多... | |
| ENGINE_API | FMaterialRenderProxy () |
| Default constructor. | |
| const class FMaterial * | GetMaterial (ERHIFeatureLevel::Type InFeatureLevel) const |
| Returns the effective FMaterial, which can be a fallback if this material's shader map is invalid. 更多... | |
| virtual FMaterial * | GetMaterialNoFallback (ERHIFeatureLevel::Type InFeatureLevel) const |
| Returns the FMaterial, without using a fallback if the FMaterial doesn't have a valid shader map. 更多... | |
| virtual const FMaterial & | GetMaterialWithFallback (ERHIFeatureLevel::Type InFeatureLevel, const FMaterialRenderProxy *&OutFallbackMaterialRenderProxy) const =0 |
| Finds the FMaterial to use for rendering this FMaterialRenderProxy. 更多... | |
| virtual ENGINE_API void | InitDynamicRHI () override |
| Initializes the dynamic RHI resource and/or RHI render target used by this resource. 更多... | |
| void ENGINE_API | InvalidateUniformExpressionCache (bool bRecreateUniformBuffer) |
| Invalidates the uniform expression cache. | |
| virtual ENGINE_API void | ReleaseDynamicRHI () override |
| Releases the dynamic RHI resource and/or RHI render target resources used by this resource. 更多... | |
| virtual ENGINE_API void | ReleaseResource () override |
| Prepares the resource for deletion. 更多... | |
| virtual ENGINE_API | ~FMaterialRenderProxy () |
| Destructor. | |
Public 成员函数 继承自 FRenderResource | |
| FRenderResource () | |
| Default constructor. | |
| FRenderResource (ERHIFeatureLevel::Type InFeatureLevel) | |
| Constructor when we know what feature level this resource should support | |
| virtual FString | GetFriendlyName () const |
| virtual void | InitDynamicRHI () |
| Initializes the dynamic RHI resource and/or RHI render target used by this resource. 更多... | |
| virtual void | InitResource () |
| Initializes the resource. 更多... | |
| virtual void | InitRHI () |
| Initializes the RHI resources used by this resource. 更多... | |
| virtual void | ReleaseDynamicRHI () |
| Releases the dynamic RHI resource and/or RHI render target resources used by this resource. 更多... | |
| virtual void | ReleaseResource () |
| Prepares the resource for deletion. 更多... | |
| virtual void | ReleaseRHI () |
| Releases the RHI resources used by this resource. 更多... | |
| void | UpdateRHI () |
| If the resource's RHI resources have been initialized, then release and reinitialize it. 更多... | |
| virtual | ~FRenderResource () |
| Destructor used to catch unreleased resources. | |
Public 属性 | |
| FImmutableSamplerState | ImmutableSamplerState |
| Cached external texture immutable samplers | |
| FUniformExpressionCacheContainer | UniformExpressionCache |
| Cached uniform expressions. | |
额外继承的成员函数 | |
静态 Public 成员函数 继承自 FRenderResource | |
| static void | InitPreRHIResources () |
| Initialize all resources initialized before the RHI was initialized | |
A material render proxy used by the renderer.
| void ENGINE_API FMaterialRenderProxy::CacheUniformExpressions_GameThread | ( | bool | bRecreateUniformBuffer | ) |
Enqueues a rendering command to cache uniform expressions for efficient runtime evaluation.
bRecreateUniformBuffer - whether to recreate the material uniform buffer.
This is required if the FMaterial is being recompiled (the uniform buffer layout will change). This should only be done if the calling code is using FMaterialUpdateContext to recreate the rendering state of primitives using this material, since cached mesh commands also cache uniform buffer pointers.
| void ENGINE_API FMaterialRenderProxy::EvaluateUniformExpressions | ( | FUniformExpressionCache & | OutUniformExpressionCache, |
| const FMaterialRenderContext & | Context, | ||
| class FRHICommandList * | CommandListIfLocalMode = nullptr |
||
| ) | const |
Evaluates uniform expressions and stores them in OutUniformExpressionCache.
| OutUniformExpressionCache | - The uniform expression cache to build. |
| MaterialRenderContext | - The context for which to cache expressions. |
|
inline |
Returns the effective FMaterial, which can be a fallback if this material's shader map is invalid.
Always returns a valid material pointer.
|
inlinevirtual |
|
pure virtual |
Finds the FMaterial to use for rendering this FMaterialRenderProxy.
Will fall back to a default material if needed due to a content error, or async compilation. OutFallbackMaterialRenderProxy - if valid, the default material had to be used and OutFallbackMaterialRenderProxy should be used for rendering.
在 FColoredMaterialRenderProxy , 以及 FOverrideSelectionColorMaterialRenderProxy 内被实现.
|
overridevirtual |
Initializes the dynamic RHI resource and/or RHI render target used by this resource.
Called when the resource is initialized, or when reseting all RHI resources. Resources that need to initialize after a D3D device reset must implement this function. This is only called by the rendering thread.
重载 FRenderResource .
|
overridevirtual |
Releases the dynamic RHI resource and/or RHI render target resources used by this resource.
Called when the resource is released, or when reseting all RHI resources. Resources that need to release before a D3D device reset must implement this function. This is only called by the rendering thread.
重载 FRenderResource .
|
overridevirtual |
Prepares the resource for deletion.
This is only called by the rendering thread.
重载 FRenderResource .