OGRE-Next: Ogre::MetalDiscardBuffer Class Reference

| OGRE-Next 3.0.0 Object-Oriented Graphics Rendering Engine

Loading...
Searching...
No Matches
Public Member Functions | List of all members
Ogre::MetalDiscardBuffer Class Reference

`#include <OgreMetalDiscardBufferManager.h>`

Inheritance diagram for Ogre::MetalDiscardBuffer:
[legend]

## Public Member Functions
| MetalDiscardBuffer (size_t bufferSize, uint16 alignment, VaoManager *vaoManager, MetalDiscardBufferManager *owner)
uint16 | getAlignment () const
size_t | getBlockSize () const
size_t | getBlockStart () const
| For internal use by MetalDiscardBufferManager.
id< MTLBuffer > | 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.
size_t | getOffset () const
MetalDiscardBufferManager * | getOwner ()
size_t | getSizeBytes () const
| Size of the buffer, may be bigger than requested due to 4-byte alignment required by Metal.
void * | map (bool noOverwrite)
| Returns a pointer that maps to the beginning of this buffer to begin writing.
void | unmap ()

## Constructor & Destructor Documentation

## ◆ MetalDiscardBuffer()

Ogre::MetalDiscardBuffer::MetalDiscardBuffer | ( | size_t | bufferSize,
|  | uint16 | alignment,
|  | VaoManager * | vaoManager,
|  | MetalDiscardBufferManager * | owner )

References MetalDiscardBufferManager.

## Member Function Documentation

## ◆ getAlignment()

uint16 Ogre::MetalDiscardBuffer::getAlignment | ( |  | ) | const
| inline

## ◆ getBlockSize()

size_t Ogre::MetalDiscardBuffer::getBlockSize | ( |  | ) | const
| inline

## ◆ getBlockStart()

size_t Ogre::MetalDiscardBuffer::getBlockStart | ( |  | ) | const
| inline

For internal use by MetalDiscardBufferManager.

## ◆ getBufferName()

id< MTLBuffer > Ogre::MetalDiscardBuffer::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

  outOffset | Out. 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::MetalDiscardBuffer::getOffset | ( |  | ) | const
| inline

## ◆ getOwner()

MetalDiscardBufferManager * Ogre::MetalDiscardBuffer::getOwner | ( |  | ) |
| inline

References MetalDiscardBufferManager.

## ◆ getSizeBytes()

size_t Ogre::MetalDiscardBuffer::getSizeBytes | ( |  | ) | const
| inline

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

## ◆ map()

void * Ogre::MetalDiscardBuffer::map | ( | bool | noOverwrite | ) |

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

Parameters

  noOverwrite | When true, noOverwrite is slow

Returns

## ◆ unmap()

void Ogre::MetalDiscardBuffer::unmap | ( |  | ) |

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

- OgreMetalDiscardBufferManager.h