diff options
Diffstat (limited to 'src/gui/rhi/qrhimetal.mm')
-rw-r--r-- | src/gui/rhi/qrhimetal.mm | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/gui/rhi/qrhimetal.mm b/src/gui/rhi/qrhimetal.mm index 46a121c812..357e9e792d 100644 --- a/src/gui/rhi/qrhimetal.mm +++ b/src/gui/rhi/qrhimetal.mm @@ -107,10 +107,6 @@ QT_BEGIN_NAMESPACE \class QRhiMetalNativeHandles \inmodule QtRhi \brief Holds the Metal device used by the QRhi. - - \note The class uses \c{void *} as the type since including the Objective C - headers is not acceptable here. The actual types are \c{id<MTLDevice>} and - \c{id<MTLCommandQueue>}. */ /*! @@ -413,8 +409,8 @@ bool QRhiMetal::create(QRhi::Flags flags) } #endif - nativeHandlesStruct.dev = d->dev; - nativeHandlesStruct.cmdQueue = d->cmdQueue; + nativeHandlesStruct.dev = (MTLDevice *) d->dev; + nativeHandlesStruct.cmdQueue = (MTLCommandQueue *) d->cmdQueue; return true; } @@ -3657,8 +3653,8 @@ void QMetalCommandBuffer::destroy() const QRhiNativeHandles *QMetalCommandBuffer::nativeHandles() { - nativeHandlesStruct.commandBuffer = d->cb; - nativeHandlesStruct.encoder = d->currentRenderPassEncoder; + nativeHandlesStruct.commandBuffer = (MTLCommandBuffer *) d->cb; + nativeHandlesStruct.encoder = (MTLRenderCommandEncoder *) d->currentRenderPassEncoder; return &nativeHandlesStruct; } |