OGRE-Next  2.3
Object-Oriented Graphics Rendering Engine
Ogre::MetalBufferInterface Class Referencefinal

For Metal, all buffers can be treated with the same code. More...

#include <OgreMetalBufferInterface.h>

+ Inheritance diagram for Ogre::MetalBufferInterface:

Public Member Functions

 MetalBufferInterface (size_t vboPoolIdx, id< MTLBuffer > vboName, MetalDynamicBuffer *dynamicBuffer)
 
 ~MetalBufferInterface () override
 
virtual void _ensureDelayedImmutableBuffersAreReady ()
 
void _firstUpload (const void *data, size_t elementStart, size_t elementCount)
 Only use this function for the first upload. More...
 
virtual void _notifyBuffer (BufferPacked *buffer)
 
void _setVboPoolIndex (size_t newVboPool)
 
void advanceFrame () override
 
void copyTo (BufferInterface *dstBuffer, size_t dstOffsetBytes, size_t srcOffsetBytes, size_t sizeBytes) override
 
BufferPackedgetBufferPacked ()
 
id< MTLBuffer > getVboName () const
 Use __unsafe_unretained when possible to avoid unnecessary ARC overhead. More...
 
size_t getVboPoolIndex ()
 
void *RESTRICT_ALIAS_RETURN map (size_t elementStart, size_t elementCount, MappingState prevMappingState, bool advanceFrame=true) override
 
void regressFrame () override
 
void unmap (UnmapOptions unmapOption, size_t flushStartElem=0, size_t flushSizeElem=0) override
 
void upload (const void *data, size_t elementStart, size_t elementCount)
 

Detailed Description

For Metal, all buffers can be treated with the same code.

Hence most equivalent functionality is encapsulated here.

Constructor & Destructor Documentation

◆ MetalBufferInterface()

Ogre::MetalBufferInterface::MetalBufferInterface ( size_t  vboPoolIdx,
id< MTLBuffer >  vboName,
MetalDynamicBuffer dynamicBuffer 
)

◆ ~MetalBufferInterface()

Ogre::MetalBufferInterface::~MetalBufferInterface ( )
override

Member Function Documentation

◆ _ensureDelayedImmutableBuffersAreReady()

virtual void Ogre::BufferInterface::_ensureDelayedImmutableBuffersAreReady ( )
virtualinherited

Reimplemented in Ogre::D3D11BufferInterfaceBase.

◆ _firstUpload()

void Ogre::MetalBufferInterface::_firstUpload ( const void *  data,
size_t  elementStart,
size_t  elementCount 
)

Only use this function for the first upload.

◆ _notifyBuffer()

virtual void Ogre::BufferInterface::_notifyBuffer ( BufferPacked buffer)
inlinevirtualinherited

Reimplemented in Ogre::NULLBufferInterface.

◆ _setVboPoolIndex()

void Ogre::MetalBufferInterface::_setVboPoolIndex ( size_t  newVboPool)
inline

◆ advanceFrame()

void Ogre::MetalBufferInterface::advanceFrame ( )
overridevirtual

Implements Ogre::BufferInterface.

◆ copyTo()

void Ogre::MetalBufferInterface::copyTo ( BufferInterface dstBuffer,
size_t  dstOffsetBytes,
size_t  srcOffsetBytes,
size_t  sizeBytes 
)
overridevirtual

Implements Ogre::BufferInterface.

◆ getBufferPacked()

BufferPacked* Ogre::BufferInterface::getBufferPacked ( )
inlineinherited

◆ getVboName()

id<MTLBuffer> Ogre::MetalBufferInterface::getVboName ( ) const
inline

Use __unsafe_unretained when possible to avoid unnecessary ARC overhead.

◆ getVboPoolIndex()

size_t Ogre::MetalBufferInterface::getVboPoolIndex ( )
inline

◆ map()

void* RESTRICT_ALIAS_RETURN Ogre::MetalBufferInterface::map ( size_t  elementStart,
size_t  elementCount,
MappingState  prevMappingState,
bool  advanceFrame = true 
)
overridevirtual

Implements Ogre::BufferInterface.

◆ regressFrame()

void Ogre::MetalBufferInterface::regressFrame ( )
overridevirtual

Implements Ogre::BufferInterface.

◆ unmap()

void Ogre::MetalBufferInterface::unmap ( UnmapOptions  unmapOption,
size_t  flushStartElem = 0,
size_t  flushSizeElem = 0 
)
overridevirtual

Implements Ogre::BufferInterface.

◆ upload()

void Ogre::BufferInterface::upload ( const void *  data,
size_t  elementStart,
size_t  elementCount 
)
inherited

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