From bc5874728c886962bd16365e09af0de85c0d6d29 Mon Sep 17 00:00:00 2001 From: assiduous Date: Sat, 24 Oct 2020 15:55:40 -0700 Subject: IRenderDeviceMtl: added CreateTextureFromMtlResource and CreateBufferFromMtlResource methods --- Graphics/GraphicsEngineMetal/interface/RenderDeviceMtl.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Graphics/GraphicsEngineMetal') diff --git a/Graphics/GraphicsEngineMetal/interface/RenderDeviceMtl.h b/Graphics/GraphicsEngineMetal/interface/RenderDeviceMtl.h index 5c1d8233..def6c787 100644 --- a/Graphics/GraphicsEngineMetal/interface/RenderDeviceMtl.h +++ b/Graphics/GraphicsEngineMetal/interface/RenderDeviceMtl.h @@ -46,6 +46,16 @@ public: /// Returns the pointer to Metal command queue (MTLCommandQueue). virtual id GetMtlCommandQueue() const = 0; + + /// Creates a texture from existing Metal resource + virtual void DILIGENT_CALL_TYPE CreateTextureFromMtlResource(id mtlTexture, + RESOURCE_STATE InitialState, + ITexture** ppTexture) = 0; + + /// Creates a buffer from existing Metal resource + virtual void DILIGENT_CALL_TYPE CreateBufferFromMtlResource(id mtlBuffer, + RESOURCE_STATE InitialState, + IBuffer** ppBuffer) = 0; }; } // namespace Diligent -- cgit v1.2.3