UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FD3D12ConstantBuffer Class Reference

#include <D3D12ConstantBuffer.h>

+ Inheritance diagram for FD3D12ConstantBuffer:

Public Member Functions

 FD3D12ConstantBuffer (FD3D12Device *InParent, FD3D12FastConstantAllocator &InAllocator)
 
virtual ~FD3D12ConstantBuffer ()
 
FORCEINLINE_DEBUGGABLE void UpdateConstant (const uint8 *Data, uint16 Offset, uint16 InSize)
 
FORCEINLINE void Reset ()
 
bool Version (FD3D12ResourceLocation &BufferOut, bool bDiscardSharedConstants)
 
- Public Member Functions inherited from FD3D12DeviceChild
 FD3D12DeviceChild (FD3D12Device *InParent=nullptr)
 
FORCEINLINE FD3D12DeviceGetParentDevice () const
 
FD3D12DeviceGetParentDevice_Unsafe () const
 

Protected Attributes

TArray< uint8ShadowData
 
uint32 CurrentUpdateSize
 
uint32 TotalUpdateSize
 
bool bIsDirty
 
FD3D12FastConstantAllocatorAllocator
 
- Protected Attributes inherited from FD3D12DeviceChild
FD3D12DeviceParent
 

Detailed Description

A D3D constant buffer

Constructor & Destructor Documentation

◆ FD3D12ConstantBuffer()

FD3D12ConstantBuffer::FD3D12ConstantBuffer ( FD3D12Device InParent,
FD3D12FastConstantAllocator InAllocator 
)

◆ ~FD3D12ConstantBuffer()

FD3D12ConstantBuffer::~FD3D12ConstantBuffer ( )
virtual

Member Function Documentation

◆ Reset()

FORCEINLINE void FD3D12ConstantBuffer::Reset ( )
inline

◆ UpdateConstant()

FORCEINLINE_DEBUGGABLE void FD3D12ConstantBuffer::UpdateConstant ( const uint8 Data,
uint16  Offset,
uint16  InSize 
)
inline

Updates a variable in the constant buffer.

Parameters
Data- The data to copy into the constant buffer
Offset- The offset in the constant buffer to place the data at
InSize- The size of the data being copied

◆ Version()

bool FD3D12ConstantBuffer::Version ( FD3D12ResourceLocation BufferOut,
bool  bDiscardSharedConstants 
)

Member Data Documentation

◆ Allocator

FD3D12FastConstantAllocator& FD3D12ConstantBuffer::Allocator
protected

◆ bIsDirty

bool FD3D12ConstantBuffer::bIsDirty
protected

◆ CurrentUpdateSize

uint32 FD3D12ConstantBuffer::CurrentUpdateSize
protected

Size of all constants that has been updated since the last call to Commit.

◆ ShadowData

TArray<uint8> FD3D12ConstantBuffer::ShadowData
protected

◆ TotalUpdateSize

uint32 FD3D12ConstantBuffer::TotalUpdateSize
protected

Size of all constants that has been updated since the last Discard. Includes "shared" constants that don't necessarily gets updated between every Commit.


The documentation for this class was generated from the following files: