![]() |
ezEngine Release 26.3
|
#include <ConstantBufferStorage.h>

Public Member Functions | |
| ezArrayPtr< ezUInt8 > | GetRawDataForWriting () |
| ezArrayPtr< const ezUInt8 > | GetRawDataForReading () const |
| Returns read-only access to the buffer data. | |
| void | BeforeBeginFrame () |
| Called at the beginning of each frame to reset per-frame state. | |
| void | UploadData (ezGALCommandEncoder *pCommandEncoder) |
| EZ_ALWAYS_INLINE ezGALBufferHandle | GetGALBufferHandle () const |
Protected Member Functions | |
| ezConstantBufferStorageBase (ezUInt32 uiSizeInBytes) | |
Protected Attributes | |
| bool | m_bHasBeenModified = false |
| bool | m_bStartOfFrame = true |
| ezUInt32 | m_uiLastHash = 0 |
| ezGALBufferHandle | m_hGALConstantBuffer |
| ezArrayPtr< ezUInt8 > | m_Data |
Friends | |
| class | ezRenderContext |
| class | ezMemoryUtils |
Wrapper around ezGALBufferHandle that automates buffer updates.
Created via ezRenderContext::CreateConstantBufferStorage. Retrieved via ezRenderContext::TryGetConstantBufferStorage, updated lazily via ezRenderContext::UploadConstants. Uses hashing to avoid redundant uploads when data hasn't changed.
| ezArrayPtr< ezUInt8 > ezConstantBufferStorageBase::GetRawDataForWriting | ( | ) |
Returns writable access to the buffer data.
Marks the buffer as modified for the next upload.
| void ezConstantBufferStorageBase::UploadData | ( | ezGALCommandEncoder * | pCommandEncoder | ) |
Uploads modified data to the GPU.
Uses hashing to skip upload if data hasn't changed since last upload.