engine
 
载入中...
搜索中...
未找到
Public 成员函数 | Public 属性 | 所有成员列表
FMaterialRenderProxy类 参考abstract

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.

成员函数说明

◆ CacheUniformExpressions_GameThread()

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.

◆ EvaluateUniformExpressions()

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.

◆ GetMaterial()

const class FMaterial * FMaterialRenderProxy::GetMaterial ( ERHIFeatureLevel::Type  InFeatureLevel) const
inline

Returns the effective FMaterial, which can be a fallback if this material's shader map is invalid.

Always returns a valid material pointer.

◆ GetMaterialNoFallback()

virtual FMaterial * FMaterialRenderProxy::GetMaterialNoFallback ( ERHIFeatureLevel::Type  InFeatureLevel) const
inlinevirtual

Returns the FMaterial, without using a fallback if the FMaterial doesn't have a valid shader map.

Can return NULL.

◆ GetMaterialWithFallback()

virtual const FMaterial & FMaterialRenderProxy::GetMaterialWithFallback ( ERHIFeatureLevel::Type  InFeatureLevel,
const FMaterialRenderProxy *&  OutFallbackMaterialRenderProxy 
) const
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 内被实现.

◆ InitDynamicRHI()

virtual ENGINE_API void FMaterialRenderProxy::InitDynamicRHI ( )
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 .

◆ ReleaseDynamicRHI()

virtual ENGINE_API void FMaterialRenderProxy::ReleaseDynamicRHI ( )
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 .

◆ ReleaseResource()

virtual ENGINE_API void FMaterialRenderProxy::ReleaseResource ( )
overridevirtual

Prepares the resource for deletion.

This is only called by the rendering thread.

重载 FRenderResource .


该类的文档由以下文件生成: