FColorVertexBuffer

A vertex buffer of colors.

Windows
MacOS
Linux

Inheritance Hierarchy

FRenderResource

FVertexBuffer

FColorVertexBuffer

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 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

const FShade...

 

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

 

Serialize

(
    FArchive& Ar,
    bool bNeedsCPUAccess
)

Serializer

Serializer

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

References

Module

Engine

Header

Runtime/Engine/Public/Rendering/ColorVertexBuffer.h

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback