summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineD3D11
diff options
context:
space:
mode:
authorassiduous <assiduous@diligentgraphics.com>2020-01-28 20:30:39 +0000
committerassiduous <assiduous@diligentgraphics.com>2020-01-28 20:30:39 +0000
commitde9b8692d538f4249e30dd979c3ebac45120be41 (patch)
tree2a0c65090d858680c3767d4dc974fd483f923294 /Graphics/GraphicsEngineD3D11
parentFixed few issues in C interface (diff)
downloadDiligentCore-de9b8692d538f4249e30dd979c3ebac45120be41.tar.gz
DiligentCore-de9b8692d538f4249e30dd979c3ebac45120be41.zip
Reworked interface definitions to use DILIGENT_BEGIN_INTERFACE/DILIGENT_END_INTERFACE pair
Diffstat (limited to 'Graphics/GraphicsEngineD3D11')
-rw-r--r--Graphics/GraphicsEngineD3D11/interface/BufferD3D11.h8
-rw-r--r--Graphics/GraphicsEngineD3D11/interface/BufferViewD3D11.h8
-rw-r--r--Graphics/GraphicsEngineD3D11/interface/DeviceContextD3D11.h8
-rw-r--r--Graphics/GraphicsEngineD3D11/interface/EngineFactoryD3D11.h8
-rw-r--r--Graphics/GraphicsEngineD3D11/interface/PipelineStateD3D11.h8
-rw-r--r--Graphics/GraphicsEngineD3D11/interface/QueryD3D11.h8
-rw-r--r--Graphics/GraphicsEngineD3D11/interface/RenderDeviceD3D11.h8
-rw-r--r--Graphics/GraphicsEngineD3D11/interface/SamplerD3D11.h8
-rw-r--r--Graphics/GraphicsEngineD3D11/interface/ShaderD3D11.h8
-rw-r--r--Graphics/GraphicsEngineD3D11/interface/ShaderResourceBindingD3D11.h7
-rw-r--r--Graphics/GraphicsEngineD3D11/interface/SwapChainD3D11.h8
-rw-r--r--Graphics/GraphicsEngineD3D11/interface/TextureD3D11.h8
-rw-r--r--Graphics/GraphicsEngineD3D11/interface/TextureViewD3D11.h8
13 files changed, 28 insertions, 75 deletions
diff --git a/Graphics/GraphicsEngineD3D11/interface/BufferD3D11.h b/Graphics/GraphicsEngineD3D11/interface/BufferD3D11.h
index d5172c05..1c4b5e60 100644
--- a/Graphics/GraphicsEngineD3D11/interface/BufferD3D11.h
+++ b/Graphics/GraphicsEngineD3D11/interface/BufferD3D11.h
@@ -42,7 +42,7 @@ static const struct INTERFACE_ID IID_BufferD3D11 =
#include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
/// Exposes Direct3D11-specific functionality of a buffer object.
-DILIGENT_INTERFACE(IBufferD3D11, IBuffer)
+DILIGENT_BEGIN_INTERFACE(IBufferD3D11, IBuffer)
{
/// Returns a pointer to the ID3D11Buffer interface of the internal Direct3D11 object.
@@ -50,6 +50,7 @@ DILIGENT_INTERFACE(IBufferD3D11, IBuffer)
/// so Release() must not be called.
VIRTUAL ID3D11Buffer* METHOD(GetD3D11Buffer)(THIS) PURE;
};
+DILIGENT_END_INTERFACE
#include "../../../Primitives/interface/UndefInterfaceHelperMacros.h"
@@ -63,11 +64,6 @@ struct IBufferD3D11Vtbl
struct IBufferD3D11Methods BufferD3D11;
};
-typedef struct IBufferD3D11
-{
- struct IBufferD3D11Vtbl* pVtbl;
-} IBufferD3D11;
-
# define IBufferD3D11_GetD3D11Buffer(This) CALL_IFACE_METHOD(BufferD3D11, GetD3D11Buffer, This)
#endif
diff --git a/Graphics/GraphicsEngineD3D11/interface/BufferViewD3D11.h b/Graphics/GraphicsEngineD3D11/interface/BufferViewD3D11.h
index 242aeb09..140ce404 100644
--- a/Graphics/GraphicsEngineD3D11/interface/BufferViewD3D11.h
+++ b/Graphics/GraphicsEngineD3D11/interface/BufferViewD3D11.h
@@ -42,7 +42,7 @@ static const struct INTERFACE_ID IID_BufferViewD3D11 =
#include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
/// Exposes Direct3D11-specific functionality of a buffer view object.
-DILIGENT_INTERFACE(IBufferViewD3D11, IBufferView)
+DILIGENT_BEGIN_INTERFACE(IBufferViewD3D11, IBufferView)
{
/// Returns a pointer to the ID3D11View interface of the internal Direct3D11 object.
@@ -50,6 +50,7 @@ DILIGENT_INTERFACE(IBufferViewD3D11, IBufferView)
/// so Release() must not be called.
VIRTUAL ID3D11View* METHOD(GetD3D11View)(THIS) PURE;
};
+DILIGENT_END_INTERFACE
#include "../../../Primitives/interface/UndefInterfaceHelperMacros.h"
@@ -63,11 +64,6 @@ struct IBufferViewD3D11Vtbl
struct IBufferViewD3D11Methods BufferViewD3D11;
};
-typedef struct IBufferViewD3D11
-{
- struct IBufferViewD3D11Vtbl* pVtbl;
-} IBufferViewD3D11;
-
# define IBufferViewD3D11_GetD3D11View(This) CALL_IFACE_METHOD(BufferViewD3D11, GetD3D11View, This)
#endif
diff --git a/Graphics/GraphicsEngineD3D11/interface/DeviceContextD3D11.h b/Graphics/GraphicsEngineD3D11/interface/DeviceContextD3D11.h
index 17a69beb..5d531302 100644
--- a/Graphics/GraphicsEngineD3D11/interface/DeviceContextD3D11.h
+++ b/Graphics/GraphicsEngineD3D11/interface/DeviceContextD3D11.h
@@ -42,7 +42,7 @@ static const struct INTERFACE_ID IID_DeviceContextD3D11 =
#include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
/// Exposes Direct3D11-specific functionality of a device context.
-DILIGENT_INTERFACE(IDeviceContextD3D11, IDeviceContext)
+DILIGENT_BEGIN_INTERFACE(IDeviceContextD3D11, IDeviceContext)
{
/// Returns a pointer to the ID3D11DeviceContext interface of the internal Direct3D11 object.
@@ -50,6 +50,7 @@ DILIGENT_INTERFACE(IDeviceContextD3D11, IDeviceContext)
/// so Release() must not be called.
VIRTUAL ID3D11DeviceContext* METHOD(GetD3D11DeviceContext)(THIS) PURE;
};
+DILIGENT_END_INTERFACE
#include "../../../Primitives/interface/UndefInterfaceHelperMacros.h"
@@ -62,11 +63,6 @@ struct IDeviceContextD3D11Vtbl
struct IDeviceContextD3D11Methods DeviceContextD3D11;
};
-typedef struct IDeviceContextD3D11
-{
- struct IDeviceContextD3D11Vtbl* pVtbl;
-} IDeviceContextD3D11;
-
# define IDeviceContextD3D11_GetD3D11DeviceContext(This) CALL_IFACE_METHOD(DeviceContextD3D11, GetD3D11DeviceContext, This)
#endif
diff --git a/Graphics/GraphicsEngineD3D11/interface/EngineFactoryD3D11.h b/Graphics/GraphicsEngineD3D11/interface/EngineFactoryD3D11.h
index ae2268b5..07bc3451 100644
--- a/Graphics/GraphicsEngineD3D11/interface/EngineFactoryD3D11.h
+++ b/Graphics/GraphicsEngineD3D11/interface/EngineFactoryD3D11.h
@@ -51,7 +51,7 @@ static const struct INTERFACE_ID IID_EngineFactoryD3D11 =
// clang-format off
/// Engine factory for Direct3D11 rendering backend.
-DILIGENT_INTERFACE(IEngineFactoryD3D11, IEngineFactory)
+DILIGENT_BEGIN_INTERFACE(IEngineFactoryD3D11, IEngineFactory)
{
/// Creates a render device and device contexts for Direct3D11-based engine implementation.
@@ -149,6 +149,7 @@ DILIGENT_INTERFACE(IEngineFactoryD3D11, IEngineFactory)
Uint32 REF NumDisplayModes,
DisplayModeAttribs* DisplayModes) PURE;
};
+DILIGENT_END_INTERFACE
#include "../../../Primitives/interface/UndefInterfaceHelperMacros.h"
@@ -163,11 +164,6 @@ struct IEngineFactoryD3D11Vtbl
struct IEngineFactoryD3D11Methods EngineFactoryD3D11;
};
-typedef struct IEngineFactoryD3D11
-{
- struct IEngineFactoryD3D11Vtbl* pVtbl;
-} IEngineFactoryD3D11;
-
// clang-format off
# define IEngineFactoryD3D11_CreateDeviceAndContextsD3D11(This, ...) CALL_IFACE_METHOD(EngineFactoryD3D11, CreateDeviceAndContextsD3D11, This, __VA_ARGS__)
diff --git a/Graphics/GraphicsEngineD3D11/interface/PipelineStateD3D11.h b/Graphics/GraphicsEngineD3D11/interface/PipelineStateD3D11.h
index 948baf8d..93cdb1f8 100644
--- a/Graphics/GraphicsEngineD3D11/interface/PipelineStateD3D11.h
+++ b/Graphics/GraphicsEngineD3D11/interface/PipelineStateD3D11.h
@@ -42,7 +42,7 @@ static const struct INTERFACE_ID IID_PipelineStateD3D11 =
#include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
/// Exposes Direct3D11-specific functionality of a pipeline state object.
-DILIGENT_INTERFACE(IPipelineStateD3D11, IPipelineState)
+DILIGENT_BEGIN_INTERFACE(IPipelineStateD3D11, IPipelineState)
{
/// Returns a pointer to the ID3D11BlendState interface of the internal Direct3D11 object.
@@ -107,6 +107,7 @@ DILIGENT_INTERFACE(IPipelineStateD3D11, IPipelineState)
/// so Release() must not be called.
VIRTUAL ID3D11ComputeShader* METHOD(GetD3D11ComputeShader)(THIS) PURE;
};
+DILIGENT_END_INTERFACE
#include "../../../Primitives/interface/UndefInterfaceHelperMacros.h"
@@ -120,11 +121,6 @@ struct IPipelineStateD3D11Vtbl
struct IPipelineStateD3D11Methods PipelineStateD3D11;
};
-typedef struct IPipelineStateD3D11
-{
- struct IPipelineStateD3D11Vtbl* pVtbl;
-} IPipelineStateD3D11;
-
// clang-format off
# define IPipelineStateD3D11_GetD3D11BlendState(This) CALL_IFACE_METHOD(PipelineStateD3D11, GetD3D11BlendState, This)
diff --git a/Graphics/GraphicsEngineD3D11/interface/QueryD3D11.h b/Graphics/GraphicsEngineD3D11/interface/QueryD3D11.h
index 80d693dc..5a0614be 100644
--- a/Graphics/GraphicsEngineD3D11/interface/QueryD3D11.h
+++ b/Graphics/GraphicsEngineD3D11/interface/QueryD3D11.h
@@ -42,11 +42,12 @@ static const struct INTERFACE_ID IID_QueryD3D11 =
#include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
/// Exposes Direct3D11-specific functionality of a Query object.
-DILIGENT_INTERFACE(IQueryD3D11, IQuery)
+DILIGENT_BEGIN_INTERFACE(IQueryD3D11, IQuery)
{
/// Returns a pointer to the internal ID3D11Query object.
VIRTUAL ID3D11Query* METHOD(GetD3D11Query)(THIS) PURE;
};
+DILIGENT_END_INTERFACE
#include "../../../Primitives/interface/UndefInterfaceHelperMacros.h"
@@ -60,11 +61,6 @@ struct IQueryD3D11Vtbl
struct IQueryD3D11Methods QueryD3D11;
};
-typedef struct IQueryD3D11
-{
- struct IQueryD3D11Vtbl* pVtbl;
-} IQueryD3D11;
-
# define IQueryD3D11_GetD3D11Query(This) CALL_IFACE_METHOD(QueryD3D11, GetD3D11Query, This)
#endif
diff --git a/Graphics/GraphicsEngineD3D11/interface/RenderDeviceD3D11.h b/Graphics/GraphicsEngineD3D11/interface/RenderDeviceD3D11.h
index 734aaa67..7a6e6c32 100644
--- a/Graphics/GraphicsEngineD3D11/interface/RenderDeviceD3D11.h
+++ b/Graphics/GraphicsEngineD3D11/interface/RenderDeviceD3D11.h
@@ -44,7 +44,7 @@ static const struct INTERFACE_ID IID_RenderDeviceD3D11 =
// clang-format off
/// Exposes Direct3D11-specific functionality of a render device.
-DILIGENT_INTERFACE(IRenderDeviceD3D11, IRenderDevice)
+DILIGENT_BEGIN_INTERFACE(IRenderDeviceD3D11, IRenderDevice)
{
/// Returns a pointer to the ID3D11Device interface of the internal Direct3D11 object.
@@ -109,6 +109,7 @@ DILIGENT_INTERFACE(IRenderDeviceD3D11, IRenderDevice)
RESOURCE_STATE InitialState,
ITexture** ppTexture) PURE;
};
+DILIGENT_END_INTERFACE
#include "../../../Primitives/interface/UndefInterfaceHelperMacros.h"
@@ -123,11 +124,6 @@ struct IRenderDeviceD3D11Vtbl
struct IRenderDeviceD3D11Methods RenderDeviceD3D11;
};
-typedef struct IRenderDeviceD3D11
-{
- struct IRenderDeviceD3D11Vtbl* pVtbl;
-} IRenderDeviceD3D11;
-
// clang-format off
# define IRenderDeviceD3D11_GetD3D11Device(This) CALL_IFACE_METHOD(RenderDeviceD3D11, GetD3D11Device, This)
diff --git a/Graphics/GraphicsEngineD3D11/interface/SamplerD3D11.h b/Graphics/GraphicsEngineD3D11/interface/SamplerD3D11.h
index de5377a8..a74e8e48 100644
--- a/Graphics/GraphicsEngineD3D11/interface/SamplerD3D11.h
+++ b/Graphics/GraphicsEngineD3D11/interface/SamplerD3D11.h
@@ -42,7 +42,7 @@ static const struct INTERFACE_ID IID_SamplerD3D11 =
#include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
/// Exposes Direct3D11-specific functionality of a sampler object.
-DILIGENT_INTERFACE(ISamplerD3D11, ISampler)
+DILIGENT_BEGIN_INTERFACE(ISamplerD3D11, ISampler)
{
/// Returns a pointer to the ID3D11SamplerState interface of the internal Direct3D11 object.
@@ -50,6 +50,7 @@ DILIGENT_INTERFACE(ISamplerD3D11, ISampler)
/// so Release() must not be called.
VIRTUAL ID3D11SamplerState* METHOD(GetD3D11SamplerState)(THIS) PURE;
};
+DILIGENT_END_INTERFACE
#include "../../../Primitives/interface/UndefInterfaceHelperMacros.h"
@@ -63,11 +64,6 @@ struct ISamplerD3D11Vtbl
struct ISamplerD3D11Methods SamplerD3D11;
};
-typedef struct ISamplerD3D11
-{
- struct ISamplerD3D11Vtbl* pVtbl;
-} ISamplerD3D11;
-
# define ISamplerD3D11_GetD3D11SamplerState(This) CALL_IFACE_METHOD(SamplerD3D11, GetD3D11SamplerState, This)
#endif
diff --git a/Graphics/GraphicsEngineD3D11/interface/ShaderD3D11.h b/Graphics/GraphicsEngineD3D11/interface/ShaderD3D11.h
index 4a68af4a..1167a917 100644
--- a/Graphics/GraphicsEngineD3D11/interface/ShaderD3D11.h
+++ b/Graphics/GraphicsEngineD3D11/interface/ShaderD3D11.h
@@ -42,7 +42,7 @@ static const struct INTERFACE_ID IID_ShaderD3D11 =
#include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
/// Exposes Direct3D11-specific functionality of a shader object.
-DILIGENT_INTERFACE(IShaderD3D11, IShaderD3D)
+DILIGENT_BEGIN_INTERFACE(IShaderD3D11, IShaderD3D)
{
/// Returns a pointer to the ID3D11DeviceChild interface of the internal Direct3D11 object.
@@ -50,6 +50,7 @@ DILIGENT_INTERFACE(IShaderD3D11, IShaderD3D)
/// so Release() must not be called.
VIRTUAL ID3D11DeviceChild* METHOD(GetD3D11Shader)(THIS) PURE;
};
+DILIGENT_END_INTERFACE
#include "../../../Primitives/interface/UndefInterfaceHelperMacros.h"
@@ -64,11 +65,6 @@ struct IShaderD3D11Vtbl
struct IShaderD3D11Methods ShaderD3D11;
};
-typedef struct IShaderD3D11
-{
- struct IShaderD3D11Vtbl* pVtbl;
-} IShaderD3D11;
-
# define IShaderD3D11_GetD3D11Shader(This) CALL_IFACE_METHOD(ShaderD3D11, GetD3D11Shader, This)
#endif
diff --git a/Graphics/GraphicsEngineD3D11/interface/ShaderResourceBindingD3D11.h b/Graphics/GraphicsEngineD3D11/interface/ShaderResourceBindingD3D11.h
index 096637c5..03c415e2 100644
--- a/Graphics/GraphicsEngineD3D11/interface/ShaderResourceBindingD3D11.h
+++ b/Graphics/GraphicsEngineD3D11/interface/ShaderResourceBindingD3D11.h
@@ -44,7 +44,8 @@ static const struct INTERFACE_ID IID_ShaderResourceBindingD3D11 =
#if DILIGENT_CPP_INTERFACE
/// Exposes Direct3D11-specific functionality of a shader resource binding object.
-DILIGENT_INTERFACE(IShaderResourceBindingD3D11, IShaderResourceBinding){};
+DILIGENT_BEGIN_INTERFACE(IShaderResourceBindingD3D11, IShaderResourceBinding){};
+DILIGENT_END_INTERFACE
#endif
@@ -60,10 +61,10 @@ struct IShaderResourceBindingD3D11Vtbl
//struct IShaderResourceBindingD3D11Methods ShaderResourceBindingD3D11;
};
-struct IShaderResourceBindingD3D11
+typedef struct IShaderResourceBindingD3D11
{
struct IShaderResourceBindingD3D11Vtbl* pVtbl;
-};
+} IShaderResourceBindingD3D11;
#endif
diff --git a/Graphics/GraphicsEngineD3D11/interface/SwapChainD3D11.h b/Graphics/GraphicsEngineD3D11/interface/SwapChainD3D11.h
index 22a4a739..b20ada09 100644
--- a/Graphics/GraphicsEngineD3D11/interface/SwapChainD3D11.h
+++ b/Graphics/GraphicsEngineD3D11/interface/SwapChainD3D11.h
@@ -43,7 +43,7 @@ static const struct INTERFACE_ID IID_SwapChainD3D11 =
#include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
/// Exposes Direct3D11-specific functionality of a swap chain.
-DILIGENT_INTERFACE(ISwapChainD3D11, ISwapChain)
+DILIGENT_BEGIN_INTERFACE(ISwapChainD3D11, ISwapChain)
{
/// Returns render target view of the back buffer in the swap chain
VIRTUAL struct ITextureViewD3D11* METHOD(GetCurrentBackBufferRTV)(THIS) PURE;
@@ -57,6 +57,7 @@ DILIGENT_INTERFACE(ISwapChainD3D11, ISwapChain)
/// so Release() must not be called.
VIRTUAL IDXGISwapChain* METHOD(GetDXGISwapChain)(THIS) PURE;
};
+DILIGENT_END_INTERFACE
#include "../../../Primitives/interface/UndefInterfaceHelperMacros.h"
@@ -70,11 +71,6 @@ struct ISwapChainD3D11Vtbl
struct ISwapChainD3D11Methods SwapChainD3D11;
};
-typedef struct ISwapChainD3D11
-{
- struct ISwapChainD3D11Vtbl* pVtbl;
-} ISwapChainD3D11;
-
// clang-format off
# define ISwapChainD3D11_GetCurrentBackBufferRTV(This) CALL_IFACE_METHOD(SwapChainD3D11, GetCurrentBackBufferRTV, This)
diff --git a/Graphics/GraphicsEngineD3D11/interface/TextureD3D11.h b/Graphics/GraphicsEngineD3D11/interface/TextureD3D11.h
index fbfc9e15..2a319e36 100644
--- a/Graphics/GraphicsEngineD3D11/interface/TextureD3D11.h
+++ b/Graphics/GraphicsEngineD3D11/interface/TextureD3D11.h
@@ -42,7 +42,7 @@ static const INTERFACE_ID IID_TextureD3D11 =
#include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
/// Exposes Direct3D11-specific functionality of a texture object.
-DILIGENT_INTERFACE(ITextureD3D11, ITexture)
+DILIGENT_BEGIN_INTERFACE(ITextureD3D11, ITexture)
{
/// Returns a pointer to the ID3D11Resource interface of the internal Direct3D11 object.
@@ -50,6 +50,7 @@ DILIGENT_INTERFACE(ITextureD3D11, ITexture)
/// so Release() must not be called.
VIRTUAL ID3D11Resource* METHOD(GetD3D11Texture)(THIS) PURE;
};
+DILIGENT_END_INTERFACE
#include "../../../Primitives/interface/UndefInterfaceHelperMacros.h"
@@ -63,11 +64,6 @@ struct ITextureD3D11Vtbl
struct ITextureD3D11Methods TextureD3D11;
};
-typedef struct ITextureD3D11
-{
- struct ITextureD3D11Vtbl* pVtbl;
-} ITextureD3D11;
-
# define ITextureD3D11_GetD3D11Texture(This) CALL_IFACE_METHOD(TextureD3D11, GetD3D11Texture, This)
#endif
diff --git a/Graphics/GraphicsEngineD3D11/interface/TextureViewD3D11.h b/Graphics/GraphicsEngineD3D11/interface/TextureViewD3D11.h
index 0e27e5e3..ee6bf6b9 100644
--- a/Graphics/GraphicsEngineD3D11/interface/TextureViewD3D11.h
+++ b/Graphics/GraphicsEngineD3D11/interface/TextureViewD3D11.h
@@ -42,7 +42,7 @@ static const INTERFACE_ID IID_TextureViewD3D11 =
#include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
/// Exposes Direct3D11-specific functionality of a texture view object.
-DILIGENT_INTERFACE(ITextureViewD3D11, ITextureView)
+DILIGENT_BEGIN_INTERFACE(ITextureViewD3D11, ITextureView)
{
/// Returns a pointer to the ID3D11View interface of the internal Direct3D11 object.
@@ -50,6 +50,7 @@ DILIGENT_INTERFACE(ITextureViewD3D11, ITextureView)
/// so Release() must not be called.
VIRTUAL ID3D11View* METHOD(GetD3D11View)(THIS) PURE;
};
+DILIGENT_END_INTERFACE
#include "../../../Primitives/interface/UndefInterfaceHelperMacros.h"
@@ -63,11 +64,6 @@ struct ITextureViewD3D11Vtbl
struct ITextureViewD3D11Methods TextureViewD3D11;
};
-typedef struct ITextureViewD3D11
-{
- struct ITextureViewD3D11Vtbl* pVtbl;
-} ITextureViewD3D11;
-
# define ITextureViewD3D11_GetD3D11View(This) CALL_IFACE_METHOD(TextureViewD3D11, GetD3D11View, This)
#endif