#include <RawIndexBuffer.h>
◆ FRawStaticIndexBuffer()
| FRawStaticIndexBuffer::FRawStaticIndexBuffer |
( |
bool |
InNeedsCPUAccess = false | ) |
|
Initialization constructor.
- Parameters
-
| InNeedsCPUAccess | True if resource array data should be accessible by the CPU. |
◆ ~FRawStaticIndexBuffer()
| FRawStaticIndexBuffer::~FRawStaticIndexBuffer |
( |
| ) |
|
|
virtualdefault |
◆ AccessStream16()
| const uint16 * FRawStaticIndexBuffer::AccessStream16 |
( |
| ) |
const |
Get the direct read access to index data Only valid if NeedsCPUAccess = true and indices are 16 bit
◆ AccessStream32()
| const uint32 * FRawStaticIndexBuffer::AccessStream32 |
( |
| ) |
const |
Get the direct read access to index data Only valid if NeedsCPUAccess = true and indices are 32 bit
◆ AppendIndices()
| void FRawStaticIndexBuffer::AppendIndices |
( |
const uint32 * |
IndicesToAppend, |
|
|
const uint32 |
NumIndicesToAppend |
|
) |
| |
Append indices to the end of the buffer
- Parameters
-
| IndicesToAppend | Pointer to the array of indices to add to the end |
| NumIndicesToAppend | How many indices are in the IndicesToAppend array |
◆ ClearMetaData()
| void FRawStaticIndexBuffer::ClearMetaData |
( |
| ) |
|
◆ CreateRHIBuffer()
◆ Discard()
| void FRawStaticIndexBuffer::Discard |
( |
| ) |
|
Discard discards the serialized data when it is not needed
◆ ExpandTo32Bit()
| void FRawStaticIndexBuffer::ExpandTo32Bit |
( |
| ) |
|
Expands the 16bit index buffer to 32bit
◆ GetAllocatedSize()
| SIZE_T FRawStaticIndexBuffer::GetAllocatedSize |
( |
| ) |
const |
|
inline |
Computes the amount of memory allocated to store the indices.
◆ GetAllowCPUAccess()
| bool FRawStaticIndexBuffer::GetAllowCPUAccess |
( |
| ) |
const |
|
inline |
◆ GetArrayView()
Retrieves an array view in to the index buffer. The array view allows code to retrieve indices as 32-bit regardless of how they are stored internally without a copy. The array view is valid only if: The buffer was created with NeedsCPUAccess = true OR the resource has not yet been initialized AND SetIndices has not been called since.
◆ GetCopy()
Retrieve a copy of the indices in this buffer. Only valid if created with NeedsCPUAccess set to true or the resource has not yet been initialized.
- Parameters
-
| OutIndices | Array in which to store the copy of the indices. |
◆ GetIndex()
| uint32 FRawStaticIndexBuffer::GetIndex |
( |
const uint32 |
At | ) |
const |
|
inline |
- Returns
- Gets a specific index value
◆ GetIndexDataSize()
| int32 FRawStaticIndexBuffer::GetIndexDataSize |
( |
| ) |
const |
|
inline |
◆ GetNumIndices()
| int32 FRawStaticIndexBuffer::GetNumIndices |
( |
| ) |
const |
|
inline |
Computes the number of indices stored in this buffer.
◆ InitRHI()
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.
Reimplemented from FRenderResource.
◆ InitRHIForStreaming()
Take over ownership of IntermediateBuffer
◆ InsertIndices()
| void FRawStaticIndexBuffer::InsertIndices |
( |
const uint32 |
At, |
|
|
const uint32 * |
IndicesToAppend, |
|
|
const uint32 |
NumIndicesToAppend |
|
) |
| |
Insert indices at the given position in the buffer
- Parameters
-
| At | Index to insert at |
| IndicesToAppend | Pointer to the array of indices to insert |
| NumIndicesToAppend | How many indices are in the IndicesToAppend array |
◆ Is32Bit()
| bool FRawStaticIndexBuffer::Is32Bit |
( |
| ) |
const |
|
inline |
◆ ReleaseRHIForStreaming()
Release any GPU resource owned by the RHI object
◆ RemoveIndicesAt()
| void FRawStaticIndexBuffer::RemoveIndicesAt |
( |
const uint32 |
At, |
|
|
const uint32 |
NumIndicesToRemove |
|
) |
| |
Removes indices from the buffer
- Parameters
-
| At | The index of the first index to remove |
| NumIndicesToRemove | How many indices to remove |
◆ Serialize()
Serialization.
- Parameters
-
| Ar | Archive to serialize with |
| bNeedsCPUAccess | Whether the elements need to be accessed by the CPU |
◆ SerializeMetaData()
| void FRawStaticIndexBuffer::SerializeMetaData |
( |
FArchive & |
Ar | ) |
|
Serialize only meta data (e.g. number of indices) but not the actual index data
◆ SetIndex()
| void FRawStaticIndexBuffer::SetIndex |
( |
const uint32 |
At, |
|
|
const uint32 |
NewIndexValue |
|
) |
| |
|
inline |
Sets a single index value. Consider using SetIndices() instead if you're setting a lot of indices.
- Parameters
-
| At | The index of the index to set |
| NewIndexValue | The index value |
◆ SetIndices()
| void FRawStaticIndexBuffer::SetIndices |
( |
const TArray< uint32 > & |
InIndices, |
|
|
EIndexBufferStride::Type |
DesiredStride |
|
) |
| |
Set the indices stored within this buffer.
- Parameters
-
| InIndices | The new indices to copy in to the buffer. |
| DesiredStride | The desired stride (16 or 32 bits). |
◆ TrySetAllowCPUAccess()
| bool FRawStaticIndexBuffer::TrySetAllowCPUAccess |
( |
bool |
bAllowCPUAccess | ) |
|
|
inline |
Copy everything, keeping reference to the same RHI resources. Returns true if input value for bAllowCPUAccess will be honored:
- if bAllowCPUAccess is true then no indices have already been cached or IndexStorage is not empty
- or if bAllowCPUAccess is false
The documentation for this class was generated from the following files: