OGRE-Next  4.0.0unstable
Object-Oriented Graphics Rendering Engine
Ogre::VulkanDiscardBuffer Class Reference

#include <OgreVulkanDiscardBufferManager.h>

+ Inheritance diagram for Ogre::VulkanDiscardBuffer:

Public Member Functions

 VulkanDiscardBuffer (size_t bufferSize, uint16 alignment, VaoManager *vaoManager, VulkanDiscardBufferManager *owner)
 
uint16 getAlignment () const
 
size_t getBlockSize () const
 
size_t getBlockStart () const
 For internal use by VulkanDiscardBufferManager. More...
 
VkBuffer getBufferName (size_t &outOffset)
 Returns the actual API buffer, but first sets mLastFrameUsed as we assume you're calling this function to use the buffer in the GPU. More...
 
size_t getOffset () const
 
VulkanDiscardBufferManagergetOwner ()
 
size_t getSizeBytes () const
 Size of the buffer, may be bigger than requested due to 4-byte alignment required by Vulkan. More...
 
void * map (bool noOverwrite)
 Returns a pointer that maps to the beginning of this buffer to begin writing. More...
 
void unmap ()
 

Constructor & Destructor Documentation

◆ VulkanDiscardBuffer()

Ogre::VulkanDiscardBuffer::VulkanDiscardBuffer ( size_t  bufferSize,
uint16  alignment,
VaoManager vaoManager,
VulkanDiscardBufferManager owner 
)

Member Function Documentation

◆ getAlignment()

uint16 Ogre::VulkanDiscardBuffer::getAlignment ( ) const
inline

◆ getBlockSize()

size_t Ogre::VulkanDiscardBuffer::getBlockSize ( ) const
inline

◆ getBlockStart()

size_t Ogre::VulkanDiscardBuffer::getBlockStart ( ) const
inline

For internal use by VulkanDiscardBufferManager.

◆ getBufferName()

VkBuffer Ogre::VulkanDiscardBuffer::getBufferName ( size_t &  outOffset)

Returns the actual API buffer, but first sets mLastFrameUsed as we assume you're calling this function to use the buffer in the GPU.

Parameters
outOffsetOut. Guaranteed to be written. Used to point to the start of our data in the internal ring buffer we've allocated.
Returns
The MTLBuffer in question.

◆ getOffset()

size_t Ogre::VulkanDiscardBuffer::getOffset ( ) const
inline

◆ getOwner()

VulkanDiscardBufferManager* Ogre::VulkanDiscardBuffer::getOwner ( )
inline

◆ getSizeBytes()

size_t Ogre::VulkanDiscardBuffer::getSizeBytes ( ) const
inline

Size of the buffer, may be bigger than requested due to 4-byte alignment required by Vulkan.

◆ map()

void* Ogre::VulkanDiscardBuffer::map ( bool  noOverwrite)

Returns a pointer that maps to the beginning of this buffer to begin writing.

Parameters
noOverwriteWhen true, noOverwrite is slow
Returns

◆ unmap()

void Ogre::VulkanDiscardBuffer::unmap ( )

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