FColorVertexBuffer

A vertex buffer of colors.

Windows
MacOS
Linux

Inheritance Hierarchy

FRenderResource

FVertexBuffer

FColorVertexBuffer

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Public/Rendering/ColorVertexBuffer.h

Include

#include "Rendering/ColorVertexBuffer.h"

Syntax

class FColorVertexBuffer : public FVertexBuffer

Remarks

A vertex buffer of colors.

Constructors

Name Description

Public function

FColorVertexBuffer()

Default constructor.

Destructors

Name Description

Public function

~FColorVertexBuffer()

Destructor.

Functions

Name Description

Public function

void

 

AppendVertices

(
    const FStaticMeshBuildVertex* ...,
    const uint32 NumVerticesToAppend
)

Appends the specified vertices to the end of the buffer

Public function Const

void

 

BindColorVertexBuffer

(
    const FVertexFactory* VertexFa...,
    FStaticMeshDataType& StaticMeshDat...
)

Public function Static

void

 

BindDefaultColorVertexBuffer

(
    const FVertexFactory* VertexFa...,
    FStaticMeshDataType& StaticMeshDat...,
    NullBindStride BindStride
)

Public function

void

 

CleanUp()

Delete existing resources

Public function

void

 

ClearMetaData()

Public function

void

 

CopyRHIForStreaming

(
    const FColorVertexBuffer& Other,
    bool InAllowCPUAccess
)

Copy everything, keeping reference to the same RHI resources.

Public function

FVertexBuffe...

 

CreateRHIBuffer_Async()

Public function

FVertexBuffe...

 

CreateRHIBuffer_RenderThread()

Create an RHI vertex buffer with CPU data.

Public function Const

void

 

ExportText

(
    FString& ValueStr
)

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

Public function Const

uint32

 

GetAllocatedSize()

Useful for memory profiling.

Public function Const

FRHIShaderRe...

 

GetColorComponentsSRV()

Public function Const

uint32

 

GetNumVertices()

Public function Const

uint32

 

GetStride()

Other accessors.

Public function Const

void

 

GetVertexColors

(
    TArray< FColor >& OutColors
)

Gets all vertex colors in the buffer

Public function

void *

 

GetVertexData()

Public function

void

 

ImportText

(
    const TCHAR* SourceText
)

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

Public function

void

 

Init

(
    uint32 InNumVertices,
    bool bNeedsCPUAccess
)

Public function

void

 

Init

(
    const TArray< FStaticMeshBuildVerte...,
    bool bNeedsCPUAccess
)

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

Public function

void

 

Init

(
    const FColorVertexBuffer& InVertex...,
    bool bNeedsCPUAccess
)

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

Public function

void

 

InitFromColorArray

(
    const TArray< FColor >& InColors
)

Load from raw color array.

Public function

void

 

InitFromColorArray

(
    const FColor* InColors,
    uint32 Count,
    uint32 Stride,
    bool bNeedsCPUAccess
)

Load from a array of colors Load from raw color array

Public function

void

 

InitFromSingleColor

(
    const FColor& InColor,
    uint32 Count
)

Load from single color.

Public function

void

 

InitRHIForStreaming

(
    FRHIVertexBuffer* Intermediate...,
    TRHIResourceUpdateBatcher< MaxNumUp...
)

Similar to Init/ReleaseRHI but only update existing SRV so references to the SRV stays valid

Public function

void

 

ReleaseRHIForStreaming

(
    TRHIResourceUpdateBatcher< MaxNumUp...
)

Public function

void

 

Serialize

(
    FArchive& Ar,
    bool bNeedsCPUAccess
)

Serializer

Serializer

Public function

void

 

SerializeMetaData

(
    FArchive& Ar
)

Public function

FColor &

 

VertexColor

(
    uint32 VertexIndex
)

Public function Const

const FColor...

 

VertexColor

(
    uint32 VertexIndex
)

Overridden from FRenderResource

Name Description

Public function Virtual Const

FString

 

GetFriendlyName()

Public function Virtual

void

 

InitRHI()

Initializes the RHI resources used by this resource.

Public function Virtual

void

 

ReleaseRHI()

Releases the RHI resources used by this resource.

Operators

Name Description

Public function

void

 

operator=

(
    const FColorVertexBuffer& Other
)

Specialized assignment operator, only used when importing LOD's.

Enums

Name

Description

Public enum

NullBindStride

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss