From 3941b472dedd0836b5e4970460fbf0e38a42e4e4 Mon Sep 17 00:00:00 2001 From: assiduous Date: Wed, 30 Sep 2020 17:01:15 -0700 Subject: A number of updates to support Metal backend --- Graphics/GraphicsEngineMetal/interface/BufferMtl.h | 4 ++-- Graphics/GraphicsEngineMetal/interface/TextureMtl.h | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'Graphics/GraphicsEngineMetal') diff --git a/Graphics/GraphicsEngineMetal/interface/BufferMtl.h b/Graphics/GraphicsEngineMetal/interface/BufferMtl.h index 1ed88a5c..7f4a0a61 100644 --- a/Graphics/GraphicsEngineMetal/interface/BufferMtl.h +++ b/Graphics/GraphicsEngineMetal/interface/BufferMtl.h @@ -41,8 +41,8 @@ static const INTERFACE_ID IID_BufferMtl = class IBufferMtl : public IBuffer { public: - /// Returns a pointer to Metal buffer (MTLBuffer) - virtual void* GetMtlBuffer() const = 0; + /// Returns a pointer to a Metal buffer (MTLBuffer). + virtual void* GetMtlResource() const = 0; }; } // namespace Diligent diff --git a/Graphics/GraphicsEngineMetal/interface/TextureMtl.h b/Graphics/GraphicsEngineMetal/interface/TextureMtl.h index da2db211..bced9bb7 100644 --- a/Graphics/GraphicsEngineMetal/interface/TextureMtl.h +++ b/Graphics/GraphicsEngineMetal/interface/TextureMtl.h @@ -41,6 +41,10 @@ static const INTERFACE_ID IID_TextureMtl = class ITextureMtl : public ITexture { public: + /// Returns a pointer to a Metal resource. + /// For a staging texture, this will be a pointer to a MTLStorageModeShared buffer (MTLBuffer). + /// For all other texture types, this will be a pointer to Metal texture object (MTLTexture). + virtual void* GetMtlResource() const = 0; }; } // namespace Diligent -- cgit v1.2.3