OGRE-Next  2.3
Object-Oriented Graphics Rendering Engine
Ogre::MetalDevice Struct Reference

#include <OgreMetalDevice.h>

Public Member Functions

 MetalDevice (MetalRenderSystem *renderSystem)
 ~MetalDevice ()
void commitAndNextCommandBuffer ()
void endAllEncoders (bool endRenderPassDesc=true)
void endBlitEncoder ()
void endComputeEncoder ()
void endRenderEncoder (bool endRenderPassDesc=true)
id< MTLBlitCommandEncoder > getBlitEncoder ()
 Gets current blit encoder. More...
id< MTLComputeCommandEncoder > getComputeEncoder ()
 See getBlitEncoder. More...
void init (const MetalDeviceItem *device)
void stall ()
 Waits for the GPU to finish all pending commands. More...

Public Attributes

id< MTLBlitCommandEncoder > mBlitEncoder
id< MTLComputeCommandEncoder > mComputeEncoder
id< MTLCommandBuffer > mCurrentCommandBuffer
id< MTLDevice > mDevice
bool mFrameAborted
 Once a frame is aborted, MTLRenderCommandEncoder are no longer created (ignored). More...
id< MTLCommandQueue > mMainCommandQueue
id< MTLRenderCommandEncoder > mRenderEncoder
dispatch_semaphore_t mStallSemaphore

Constructor & Destructor Documentation

◆ MetalDevice()

Ogre::MetalDevice::MetalDevice ( MetalRenderSystem renderSystem)

◆ ~MetalDevice()

Ogre::MetalDevice::~MetalDevice ( )

Member Function Documentation

◆ commitAndNextCommandBuffer()

void Ogre::MetalDevice::commitAndNextCommandBuffer ( )

◆ endAllEncoders()

void Ogre::MetalDevice::endAllEncoders ( bool  endRenderPassDesc = true)

◆ endBlitEncoder()

void Ogre::MetalDevice::endBlitEncoder ( )

◆ endComputeEncoder()

void Ogre::MetalDevice::endComputeEncoder ( )

◆ endRenderEncoder()

void Ogre::MetalDevice::endRenderEncoder ( bool  endRenderPassDesc = true)

◆ getBlitEncoder()

id<MTLBlitCommandEncoder> Ogre::MetalDevice::getBlitEncoder ( )

Gets current blit encoder.

If none is current, ends all other encoders and creates a new blit encoder.

Use __unsafe_unretained to avoid unnecessary ARC overhead; unless you really need to hold on to the returned variable. i.e. __unsafe_unretained id<MTLBlitCommandEncoder> blitEncoder = mDevice->getBlitEncoder();

◆ getComputeEncoder()

id<MTLComputeCommandEncoder> Ogre::MetalDevice::getComputeEncoder ( )

See getBlitEncoder.

◆ init()

void Ogre::MetalDevice::init ( const MetalDeviceItem device)

◆ stall()

void Ogre::MetalDevice::stall ( )

Waits for the GPU to finish all pending commands.

Member Data Documentation

◆ mBlitEncoder

id<MTLBlitCommandEncoder> Ogre::MetalDevice::mBlitEncoder

◆ mComputeEncoder

id<MTLComputeCommandEncoder> Ogre::MetalDevice::mComputeEncoder

◆ mCurrentCommandBuffer

id<MTLCommandBuffer> Ogre::MetalDevice::mCurrentCommandBuffer

◆ mDevice

id<MTLDevice> Ogre::MetalDevice::mDevice

◆ mFrameAborted

bool Ogre::MetalDevice::mFrameAborted

Once a frame is aborted, MTLRenderCommandEncoder are no longer created (ignored).

◆ mMainCommandQueue

id<MTLCommandQueue> Ogre::MetalDevice::mMainCommandQueue

◆ mRenderEncoder

id<MTLRenderCommandEncoder> Ogre::MetalDevice::mRenderEncoder

◆ mRenderSystem

MetalRenderSystem* Ogre::MetalDevice::mRenderSystem

◆ mStallSemaphore

dispatch_semaphore_t Ogre::MetalDevice::mStallSemaphore

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