RavEngine
Loading...
Searching...
No Matches
RavEngine::BufferedVRAMVector< T > Class Template Reference
Inheritance diagram for RavEngine::BufferedVRAMVector< T >:
[legend]
Collaboration diagram for RavEngine::BufferedVRAMVector< T >:
[legend]

Public Member Functions

 BufferedVRAMVector (const std::string_view debugName)
 
 BufferedVRAMVector (uint32_t initialSize)
 
 MOVE_NO_COPY (BufferedVRAMVector)
 
auto & GetHostBuffer () const
 
void EncodeSync (RGLDevicePtr device, RGLCommandBufferPtr commandBuffer, const Function< void(RGLBufferPtr)> &gcBuffersFn, bool &previousCommandResetCB)
 
void Resize (uint32_t newSize)
 
void _setElementCount (uint32_t allocatedElements)
 
void push_back (const T &value)
 
void erase (const auto &it)
 
auto begin ()
 
void reserve (uint32_t size)
 
auto Size () const
 
auto capacity () const
 
const auto & operator[] (uint32_t i) const
 
void SetValueAt (uint32_t i, const T &value)
 
auto & GetValueAtForWriting (uint32_t i)
 
- Public Member Functions inherited from RavEngine::BufferedVRAMStructureBase
auto GetPrivateBuffer () const
 
 BufferedVRAMStructureBase (const std::string_view debugName)
 
 MOVE_NO_COPY (BufferedVRAMStructureBase)
 

Additional Inherited Members

- Protected Member Functions inherited from RavEngine::BufferedVRAMStructureBase
void EncodeSync (RGLDevicePtr device, RGLBufferPtr hostBuffer, RGLCommandBufferPtr commandBuffer, uint32_t elemSize, const Function< void(RGLBufferPtr)> &gcBuffersFn, bool &previousCommandResetCB)
 
void InitializePrivateBuffer (RGLDevicePtr device, uint32_t size)
 
- Protected Attributes inherited from RavEngine::BufferedVRAMStructureBase
RGLBufferPtr privateBuffer
 
std::string debugName
 
std::vector< unsigned char > syncTrackingBuffer
 

Member Function Documentation

◆ _setElementCount()

template<typename T >
void RavEngine::BufferedVRAMVector< T >::_setElementCount ( uint32_t  allocatedElements)
inline

Set the internal "size" of the container. Does not initialize or destroy elements. Use with care.

◆ EncodeSync()

template<typename T >
void RavEngine::BufferedVRAMVector< T >::EncodeSync ( RGLDevicePtr  device,
RGLCommandBufferPtr  commandBuffer,
const Function< void(RGLBufferPtr)> &  gcBuffersFn,
bool &  previousCommandResetCB 
)
inline

Encodes commands to sync the host buffer with the private buffer.

Note
This function may change the value returned by GetPrivateBuffer(). Do not call GetPrivateBuffer() until after calling EncodeSync.
Returns
true if commands were encoded

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