summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineMetal
diff options
context:
space:
mode:
authorassiduous <assiduous@diligentgraphics.com>2020-10-24 22:55:40 +0000
committerassiduous <assiduous@diligentgraphics.com>2020-10-24 22:55:40 +0000
commitbc5874728c886962bd16365e09af0de85c0d6d29 (patch)
tree28a5c8d86909f154b0bc01159597fe840a2c48ad /Graphics/GraphicsEngineMetal
parentUpdated buffer creation test to support Metal (diff)
downloadDiligentCore-bc5874728c886962bd16365e09af0de85c0d6d29.tar.gz
DiligentCore-bc5874728c886962bd16365e09af0de85c0d6d29.zip
IRenderDeviceMtl: added CreateTextureFromMtlResource and CreateBufferFromMtlResource methods
Diffstat (limited to 'Graphics/GraphicsEngineMetal')
-rw-r--r--Graphics/GraphicsEngineMetal/interface/RenderDeviceMtl.h10
1 files changed, 10 insertions, 0 deletions
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<MTLCommandQueue> GetMtlCommandQueue() const = 0;
+
+ /// Creates a texture from existing Metal resource
+ virtual void DILIGENT_CALL_TYPE CreateTextureFromMtlResource(id<MTLTexture> mtlTexture,
+ RESOURCE_STATE InitialState,
+ ITexture** ppTexture) = 0;
+
+ /// Creates a buffer from existing Metal resource
+ virtual void DILIGENT_CALL_TYPE CreateBufferFromMtlResource(id<MTLBuffer> mtlBuffer,
+ RESOURCE_STATE InitialState,
+ IBuffer** ppBuffer) = 0;
};
} // namespace Diligent