struct render::DebugDrawUniformDefinition

Inherits: GpuUniformBuffer

Public

Constructors

DebugDrawUniformDefinition

DebugDrawUniformDefinition()

Methods

~GpuUniformBuffer

virtual ~GpuUniformBuffer() noexcept

Destroy

virtual void Destroy()

GetSize

u32 GetSize() const

Returns the size of the uniform buffer, in bytes.

CreateBuffer

SPtr<GpuBuffer> CreateBuffer(GpuBufferFlags flags = GpuBufferFlag::StoreOnCPUWithGPUAccess) const

Allocates a new buffer that can store all the members defined in this uniform buffer.

For buffers that are modified every frame prefer using AllocateTransient() instead.

AllocateTransient

GpuBufferSuballocation AllocateTransient()

Allocates a transient uniform buffer suballocation from the internal pool.

The transient allocation will remain valid for RenderThread::kMaximumFramesInFlight frames, after which it may be reused for other allocations. You should use this for uniform buffers that are updated every frame.

Note that transient buffer allocations might be larger than size returned by GetSize(), due to alignment requirements.

Fields

gMatViewProj

GpuUniformBufferMember<Matrix4> gMatViewProj

gViewDir

GpuUniformBufferMember<Vector4> gViewDir

Protected

Fields

mBufferSize

u32 mBufferSize

mTransientAllocationPool

TransientGpuBufferPool mTransientAllocationPool

Private

Methods

Initialize

void Initialize() override

staticMETA_GetPrevEntries

static void META_GetPrevEntries(TArray<GpuUniformBufferMemberInformation> &members, META_FirstEntry id)

META_InitPrevEntry

void META_InitPrevEntry(const TArray<GpuUniformBufferMemberInformation> &members, u32 idx, META_FirstEntry id)

staticMETA_GetPrevEntries

static void META_GetPrevEntries(TArray<GpuUniformBufferMemberInformation> &members, META_NextEntry_gMatViewProj id)

META_InitPrevEntry

void META_InitPrevEntry(const TArray<GpuUniformBufferMemberInformation> &members, u32 index, META_NextEntry_gMatViewProj id)

staticMETA_GetPrevEntries

static void META_GetPrevEntries(TArray<GpuUniformBufferMemberInformation> &members, META_NextEntry_gViewDir id)

META_InitPrevEntry

void META_InitPrevEntry(const TArray<GpuUniformBufferMemberInformation> &members, u32 index, META_NextEntry_gViewDir id)

staticGetEntries

InitEntries

void InitEntries()