OGRE-Next: Ogre::MetalDevice Struct Reference

| OGRE-Next 3.0.0 Object-Oriented Graphics Rendering Engine

Loading...
Searching...
No Matches
Ogre::MetalDevice Struct Reference

`#include <OgreMetalDevice.h>`

## Public Member Functions
| MetalDevice (MetalRenderSystem *renderSystem)
| ~MetalDevice ()
void | _waitUntilCommitedCommandBufferCompleted ()
| Waits for the last committed command buffer completion instead of the last frame completion with command buffer switching, so we can continue to work with current command buffer.
void | commitAndNextCommandBuffer ()
void | endAllEncoders (bool endRenderPassDesc=true)
void | endBlitEncoder ()
void | endComputeEncoder ()
void | endRenderEncoder (bool endRenderPassDesc=true)
id< MTLBlitCommandEncoder > | getBlitEncoder ()
| Gets current blit encoder.
id< MTLComputeCommandEncoder > | getComputeEncoder ()
| See getBlitEncoder.
void | init (const MetalDeviceItem *device)
void | stall ()
| Waits for the GPU to finish all pending commands.

## Public Attributes
id< MTLBlitCommandEncoder > | mBlitEncoder
id< MTLCommandBuffer > | mCommitedCommandBuffer
id< MTLComputeCommandEncoder > | mComputeEncoder
id< MTLCommandBuffer > | mCurrentCommandBuffer
id< MTLDevice > | mDevice
bool | mFrameAborted
| Once a frame is aborted, MTLRenderCommandEncoder are no longer created (ignored).
id< MTLCommandQueue > | mMainCommandQueue
id< MTLRenderCommandEncoder > | mRenderEncoder
MetalRenderSystem * | mRenderSystem
dispatch_semaphore_t | mStallSemaphore

## Constructor & Destructor Documentation

## ◆ MetalDevice()

Ogre::MetalDevice::MetalDevice | ( | MetalRenderSystem * | renderSystem | ) |

## ◆ ~MetalDevice()

Ogre::MetalDevice::~MetalDevice | ( |  | ) |

## Member Function Documentation

## ◆ _waitUntilCommitedCommandBufferCompleted()

void Ogre::MetalDevice::_waitUntilCommitedCommandBufferCompleted | ( |  | ) |

Waits for the last committed command buffer completion instead of the last frame completion with command buffer switching, so we can continue to work with current command buffer.

It's required for BT_DEFAULT_SHARED buffers upload

## ◆ 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.

Remarks
  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

## ◆ mCommitedCommandBuffer

id<MTLCommandBuffer> Ogre::MetalDevice::mCommitedCommandBuffer

## ◆ 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:

- OgreMetalDevice.h