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

A vertex buffer of colors. 更多...

#include <ColorVertexBuffer.h>

+ 类 FColorVertexBuffer 继承关系图:

Public 成员函数

ENGINE_API void AppendVertices (const FStaticMeshBuildVertex *Vertices, const uint32 NumVerticesToAppend)
 Appends the specified vertices to the end of the buffer 更多...
 
ENGINE_API void CleanUp ()
 Delete existing resources
 
void CopyRHIForStreaming (const FColorVertexBuffer &Other, bool InAllowCPUAccess)
 Copy everything, keeping reference to the same RHI resources.
 
FVertexBufferRHIRef CreateRHIBuffer_RenderThread ()
 Create an RHI vertex buffer with CPU data. 更多...
 
void ExportText (FString &ValueStr) const
 Export the data to a string, used for editor Copy&Paste. 更多...
 
ENGINE_API FColorVertexBuffer ()
 Default constructor.
 
ENGINE_API uint32 GetAllocatedSize () const
 Useful for memory profiling.
 
virtual FString GetFriendlyName () const override
 
ENGINE_API void GetVertexColors (TArray< FColor > &OutColors) const
 Gets all vertex colors in the buffer 更多...
 
void ImportText (const TCHAR *SourceText)
 Export the data from a string, used for editor Copy&Paste. 更多...
 
void Init (const FColorVertexBuffer &InVertexBuffer, bool bNeedsCPUAccess=true)
 Initializes this vertex buffer with the contents of the given vertex buffer. 更多...
 
ENGINE_API void Init (const TArray< FStaticMeshBuildVertex > &InVertices, bool bNeedsCPUAccess=true)
 Initializes the buffer with the given vertices, used to convert legacy layouts. 更多...
 
ENGINE_API void InitFromColorArray (const FColor *InColors, uint32 Count, uint32 Stride=sizeof(FColor), bool bNeedsCPUAccess=true)
 Load from a array of colors 更多...
 
void InitFromColorArray (const TArray< FColor > &InColors)
 Load from raw color array. 更多...
 
void InitFromSingleColor (const FColor &InColor, uint32 Count)
 Load from single color. 更多...
 
virtual ENGINE_API void InitRHI () override
 Initializes the RHI resources used by this resource. 更多...
 
template<uint32 MaxNumUpdates>
void InitRHIForStreaming (FRHIVertexBuffer *IntermediateBuffer, TRHIResourceUpdateBatcher< MaxNumUpdates > &Batcher)
 Similar to Init/ReleaseRHI but only update existing SRV so references to the SRV stays valid
 
ENGINE_API void operator= (const FColorVertexBuffer &Other)
 Specialized assignment operator, only used when importing LOD's.
 
virtual ENGINE_API void ReleaseRHI () override
 Releases the RHI resources used by this resource. 更多...
 
void Serialize (FArchive &Ar, bool bNeedsCPUAccess)
 Serializer 更多...
 
ENGINE_API ~FColorVertexBuffer ()
 Destructor.
 
- Public 成员函数 继承自 FVertexBuffer
virtual FString GetFriendlyName () const override
 
virtual void ReleaseRHI () override
 Releases the RHI resources used by this resource. 更多...
 
virtual ~FVertexBuffer ()
 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 成员函数 继承自 FRenderResource
static void InitPreRHIResources ()
 Initialize all resources initialized before the RHI was initialized
 

详细描述

A vertex buffer of colors.

成员函数说明

◆ AppendVertices()

ENGINE_API void FColorVertexBuffer::AppendVertices ( const FStaticMeshBuildVertex *  Vertices,
const uint32  NumVerticesToAppend 
)

Appends the specified vertices to the end of the buffer

参数
VerticesThe vertex data to be appended. Must not be nullptr.
NumVerticesToAppendHow many vertices should be added

◆ CreateRHIBuffer_RenderThread()

FVertexBufferRHIRef FColorVertexBuffer::CreateRHIBuffer_RenderThread ( )

Create an RHI vertex buffer with CPU data.

CPU data may be discarded after creation (see TResourceArray::Discard)

◆ ExportText()

void FColorVertexBuffer::ExportText ( FString &  ValueStr) const

Export the data to a string, used for editor Copy&Paste.

The method must not be called if there is no data.

◆ GetFriendlyName()

virtual FString FColorVertexBuffer::GetFriendlyName ( ) const
inlineoverridevirtual
返回
The resource's friendly name. Typically a UObject name.

重载 FVertexBuffer .

◆ GetVertexColors()

ENGINE_API void FColorVertexBuffer::GetVertexColors ( TArray< FColor > &  OutColors) const

Gets all vertex colors in the buffer

参数
OutColorsThe populated list of colors

◆ ImportText()

void FColorVertexBuffer::ImportText ( const TCHAR *  SourceText)

Export the data from a string, used for editor Copy&Paste.

参数
SourceText- must not be 0

◆ Init() [1/2]

void FColorVertexBuffer::Init ( const FColorVertexBuffer &  InVertexBuffer,
bool  bNeedsCPUAccess = true 
)

Initializes this vertex buffer with the contents of the given vertex buffer.

参数
InVertexBuffer- The vertex buffer to initialize from.

◆ Init() [2/2]

ENGINE_API void FColorVertexBuffer::Init ( const TArray< FStaticMeshBuildVertex > &  InVertices,
bool  bNeedsCPUAccess = true 
)

Initializes the buffer with the given vertices, used to convert legacy layouts.

参数
InVertices- The vertices to initialize the buffer with.

◆ InitFromColorArray() [1/2]

ENGINE_API void FColorVertexBuffer::InitFromColorArray ( const FColor *  InColors,
uint32  Count,
uint32  Stride = sizeof(FColor),
bool  bNeedsCPUAccess = true 
)

Load from a array of colors

参数
InColors- must not be 0
Count- must be > 0
Stride- in bytes, usually sizeof(FColor) but can be 0 to use a single input color or larger.

◆ InitFromColorArray() [2/2]

void FColorVertexBuffer::InitFromColorArray ( const TArray< FColor > &  InColors)
inline

Load from raw color array.

参数
InColors- InColors must not be empty

◆ InitFromSingleColor()

void FColorVertexBuffer::InitFromSingleColor ( const FColor &  InColor,
uint32  Count 
)
inline

Load from single color.

参数
Count- must be > 0

◆ InitRHI()

virtual ENGINE_API void FColorVertexBuffer::InitRHI ( )
overridevirtual

Initializes the RHI resources used by this resource.

Called when entering the state where both the resource and the RHI have been initialized. This is only called by the rendering thread.

重载 FRenderResource .

◆ ReleaseRHI()

virtual ENGINE_API void FColorVertexBuffer::ReleaseRHI ( )
overridevirtual

Releases the RHI resources used by this resource.

Called when leaving the state where both the resource and the RHI have been initialized. This is only called by the rendering thread.

重载 FVertexBuffer .

◆ Serialize()

void FColorVertexBuffer::Serialize ( FArchive &  Ar,
bool  bNeedsCPUAccess 
)

Serializer

参数
ArArchive to serialize with
bInNeedsCPUAccessWhether the elements need to be accessed by the CPU

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