summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngine
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/GraphicsEngine
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/GraphicsEngine')
-rw-r--r--Graphics/GraphicsEngine/interface/Buffer.h8
-rw-r--r--Graphics/GraphicsEngine/interface/BufferView.h8
-rw-r--r--Graphics/GraphicsEngine/interface/DeviceContext.h8
-rw-r--r--Graphics/GraphicsEngine/interface/DeviceObject.h8
-rw-r--r--Graphics/GraphicsEngine/interface/EngineFactory.h8
-rw-r--r--Graphics/GraphicsEngine/interface/Fence.h8
-rw-r--r--Graphics/GraphicsEngine/interface/PipelineState.h8
-rw-r--r--Graphics/GraphicsEngine/interface/Query.h8
-rw-r--r--Graphics/GraphicsEngine/interface/RenderDevice.h8
-rw-r--r--Graphics/GraphicsEngine/interface/ResourceMapping.h8
-rw-r--r--Graphics/GraphicsEngine/interface/Sampler.h3
-rw-r--r--Graphics/GraphicsEngine/interface/Shader.h18
-rw-r--r--Graphics/GraphicsEngine/interface/ShaderResourceBinding.h8
-rw-r--r--Graphics/GraphicsEngine/interface/ShaderResourceVariable.h8
-rw-r--r--Graphics/GraphicsEngine/interface/SwapChain.h8
-rw-r--r--Graphics/GraphicsEngine/interface/Texture.h8
-rw-r--r--Graphics/GraphicsEngine/interface/TextureView.h8
17 files changed, 36 insertions, 105 deletions
diff --git a/Graphics/GraphicsEngine/interface/Buffer.h b/Graphics/GraphicsEngine/interface/Buffer.h
index f2979b3c..94a9d07a 100644
--- a/Graphics/GraphicsEngine/interface/Buffer.h
+++ b/Graphics/GraphicsEngine/interface/Buffer.h
@@ -180,7 +180,7 @@ typedef struct BufferData BufferData;
/// Buffer interface
/// Defines the methods to manipulate a buffer object
-DILIGENT_INTERFACE(IBuffer, IDeviceObject)
+DILIGENT_BEGIN_INTERFACE(IBuffer, IDeviceObject)
{
#if DILIGENT_CPP_INTERFACE
/// Returns the buffer description used to create the object
@@ -235,6 +235,7 @@ DILIGENT_INTERFACE(IBuffer, IDeviceObject)
/// Returns the internal buffer state
VIRTUAL RESOURCE_STATE METHOD(GetState)(THIS) CONST PURE;
};
+DILIGENT_END_INTERFACE
#include "../../../Primitives/interface/UndefInterfaceHelperMacros.h"
@@ -249,11 +250,6 @@ struct IBufferVtbl
struct IBufferMethods Buffer;
};
-typedef struct IBuffer
-{
- struct IBufferVtbl* pVtbl;
-} IBuffer;
-
// clang-format off
# define IBuffer_GetDesc(This) (const struct BufferDesc*)IDeviceObject_GetDesc(This)
diff --git a/Graphics/GraphicsEngine/interface/BufferView.h b/Graphics/GraphicsEngine/interface/BufferView.h
index 9bfdc7c4..4005ff10 100644
--- a/Graphics/GraphicsEngine/interface/BufferView.h
+++ b/Graphics/GraphicsEngine/interface/BufferView.h
@@ -148,7 +148,7 @@ typedef struct BufferViewDesc BufferViewDesc;
/// \remarks
/// Buffer view holds strong references to the buffer. The buffer
/// will not be destroyed until all views are released.
-DILIGENT_INTERFACE(IBufferView, IDeviceObject)
+DILIGENT_BEGIN_INTERFACE(IBufferView, IDeviceObject)
{
#if DILIGENT_CPP_INTERFACE
/// Returns the buffer view description used to create the object
@@ -161,6 +161,7 @@ DILIGENT_INTERFACE(IBufferView, IDeviceObject)
/// so Release() must not be called.
VIRTUAL struct IBuffer* METHOD(GetBuffer)(THIS) PURE;
};
+DILIGENT_END_INTERFACE
#include "../../../Primitives/interface/UndefInterfaceHelperMacros.h"
@@ -175,11 +176,6 @@ struct IBufferViewVtbl
struct IBufferViewMethods BufferView;
};
-typedef struct IBufferView
-{
- struct IBufferViewVtbl* pVtbl;
-} IBufferView;
-
// clang-format off
# define IBufferView_GetDesc(This) (const struct BufferViewDesc*)IDeviceObject_GetDesc(This)
diff --git a/Graphics/GraphicsEngine/interface/DeviceContext.h b/Graphics/GraphicsEngine/interface/DeviceContext.h
index 35283bbe..8834fe94 100644
--- a/Graphics/GraphicsEngine/interface/DeviceContext.h
+++ b/Graphics/GraphicsEngine/interface/DeviceContext.h
@@ -618,7 +618,7 @@ typedef struct CopyTextureAttribs CopyTextureAttribs;
/// the pipeline: buffers, states, samplers, shaders, etc.
/// The context also keeps strong reference to the device and
/// the swap chain.
-DILIGENT_INTERFACE(IDeviceContext, IObject)
+DILIGENT_BEGIN_INTERFACE(IDeviceContext, IObject)
{
/// Sets the pipeline state.
@@ -1313,6 +1313,7 @@ DILIGENT_INTERFACE(IDeviceContext, IObject)
ITexture* pDstTexture,
const ResolveTextureSubresourceAttribs REF ResolveAttribs) PURE;
};
+DILIGENT_END_INTERFACE
#include "../../../Primitives/interface/UndefInterfaceHelperMacros.h"
@@ -1326,11 +1327,6 @@ struct IDeviceContextVtbl
struct IDeviceContextMethods DeviceContext;
};
-typedef struct IDeviceContext
-{
- struct IDeviceContextVtbl* pVtbl;
-} IDeviceContext;
-
// clang-format off
# define IDeviceContext_SetPipelineState(This, ...) CALL_IFACE_METHOD(DeviceContext, SetPipelineState, This, __VA_ARGS__)
diff --git a/Graphics/GraphicsEngine/interface/DeviceObject.h b/Graphics/GraphicsEngine/interface/DeviceObject.h
index 35bc0bb5..d9f13185 100644
--- a/Graphics/GraphicsEngine/interface/DeviceObject.h
+++ b/Graphics/GraphicsEngine/interface/DeviceObject.h
@@ -44,7 +44,7 @@ static const INTERFACE_ID IID_DeviceObject =
#include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
/// Base interface for all objects created by the render device Diligent::IRenderDevice
-DILIGENT_INTERFACE(IDeviceObject, IObject)
+DILIGENT_BEGIN_INTERFACE(IDeviceObject, IObject)
{
/// Returns the object description
VIRTUAL const DeviceObjectAttribs REF METHOD(GetDesc)(THIS) CONST PURE;
@@ -68,6 +68,7 @@ DILIGENT_INTERFACE(IDeviceObject, IObject)
/// assigned to an object and are always guaranteed to be invalid.
VIRTUAL Int32 METHOD(GetUniqueID)(THIS) CONST PURE;
};
+DILIGENT_END_INTERFACE
#include "../../../Primitives/interface/UndefInterfaceHelperMacros.h"
@@ -81,11 +82,6 @@ struct IDeviceObjectVtbl
struct IDeviceObjectMethods DeviceObject;
};
-typedef struct IDeviceObject
-{
- struct IDeviceObjectVtbl* pVtbl;
-}IDeviceObject;
-
// clang-format off
# define IDeviceObject_GetDesc(This) CALL_IFACE_METHOD(DeviceObject, GetDesc, This)
diff --git a/Graphics/GraphicsEngine/interface/EngineFactory.h b/Graphics/GraphicsEngine/interface/EngineFactory.h
index 84157c30..5f20d358 100644
--- a/Graphics/GraphicsEngine/interface/EngineFactory.h
+++ b/Graphics/GraphicsEngine/interface/EngineFactory.h
@@ -48,7 +48,7 @@ static const INTERFACE_ID IID_EngineFactory =
// clang-format off
/// Engine factory base interface
-DILIGENT_INTERFACE(IEngineFactory, IObject)
+DILIGENT_BEGIN_INTERFACE(IEngineFactory, IObject)
{
/// Returns API info structure
VIRTUAL const APIInfo REF METHOD(GetAPIInfo)(THIS) CONST PURE;
@@ -71,6 +71,7 @@ DILIGENT_INTERFACE(IEngineFactory, IObject)
const char* ActivityClassName) CONST PURE;
#endif
};
+DILIGENT_END_INTERFACE
#include "../../../Primitives/interface/UndefInterfaceHelperMacros.h"
@@ -84,11 +85,6 @@ struct IEngineFactoryVtbl
struct IEngineFactoryMethods EngineFactory;
};
-typedef struct IEngineFactory
-{
- struct IEngineFactoryVtbl* pVtbl;
-} IEngineFactory;
-
// clang-format off
# define IEngineFactory_GetAPIInfo(This) CALL_IFACE_METHOD(EngineFactory, GetAPIInfo, This)
diff --git a/Graphics/GraphicsEngine/interface/Fence.h b/Graphics/GraphicsEngine/interface/Fence.h
index 0cf50f6d..e76ff4f3 100644
--- a/Graphics/GraphicsEngine/interface/Fence.h
+++ b/Graphics/GraphicsEngine/interface/Fence.h
@@ -56,7 +56,7 @@ typedef struct FenceDesc FenceDesc;
///
/// \remarks When a fence that was previously signaled by IDeviceContext::SignalFence() is destroyed,
/// it may block the GPU until all prior commands have completed execution.
-DILIGENT_INTERFACE(IFence, IDeviceObject)
+DILIGENT_BEGIN_INTERFACE(IFence, IDeviceObject)
{
#if DILIGENT_CPP_INTERFACE
/// Returns the fence description used to create the object
@@ -74,6 +74,7 @@ DILIGENT_INTERFACE(IFence, IDeviceObject)
VIRTUAL void METHOD(Reset)(THIS_
Uint64 Value) PURE;
};
+DILIGENT_END_INTERFACE
#include "../../../Primitives/interface/UndefInterfaceHelperMacros.h"
@@ -88,11 +89,6 @@ struct IFenceVtbl
struct IFenceMethods Fence;
};
-typedef struct IFence
-{
- struct IFenceVtbl* pVtbl;
-} IFence;
-
// clang-format off
# define IFence_GetDesc(This) (const struct FenceDesc*)IDeviceObject_GetDesc(This)
diff --git a/Graphics/GraphicsEngine/interface/PipelineState.h b/Graphics/GraphicsEngine/interface/PipelineState.h
index bc27c8ac..d66a86ac 100644
--- a/Graphics/GraphicsEngine/interface/PipelineState.h
+++ b/Graphics/GraphicsEngine/interface/PipelineState.h
@@ -260,7 +260,7 @@ static const struct INTERFACE_ID IID_PipelineState =
// clang-format off
/// Pipeline state interface
-DILIGENT_INTERFACE(IPipelineState, IDeviceObject)
+DILIGENT_BEGIN_INTERFACE(IPipelineState, IDeviceObject)
{
#if DILIGENT_CPP_INTERFACE
/// Returns the blend state description used to create the object
@@ -346,6 +346,7 @@ DILIGENT_INTERFACE(IPipelineState, IDeviceObject)
VIRTUAL bool METHOD(IsCompatibleWith)(THIS_
const struct IPipelineState* pPSO) CONST PURE;
};
+DILIGENT_END_INTERFACE
#include "../../../Primitives/interface/UndefInterfaceHelperMacros.h"
@@ -360,11 +361,6 @@ struct IPipelineStateVtbl
struct IPipelineStateMethods PipelineState;
};
-typedef struct IPipelineState
-{
- struct IPipelineStateVtbl* pVtbl;
-} IPipelineState;
-
// clang-format off
# define IPipelineState_GetDesc(This) (const struct PipelineStateDesc*)IDeviceObject_GetDesc(This)
diff --git a/Graphics/GraphicsEngine/interface/Query.h b/Graphics/GraphicsEngine/interface/Query.h
index dea4b71f..80a6d13a 100644
--- a/Graphics/GraphicsEngine/interface/Query.h
+++ b/Graphics/GraphicsEngine/interface/Query.h
@@ -181,7 +181,7 @@ typedef struct QueryDesc QueryDesc;
/// Query interface.
/// Defines the methods to manipulate a Query object
-DILIGENT_INTERFACE(IQuery, IDeviceObject)
+DILIGENT_BEGIN_INTERFACE(IQuery, IDeviceObject)
{
#if DILIGENT_CPP_INTERFACE
/// Returns the Query description used to create the object.
@@ -216,6 +216,7 @@ DILIGENT_INTERFACE(IQuery, IDeviceObject)
/// Invalidates the query and releases associated resources.
VIRTUAL void METHOD(Invalidate)(THIS) PURE;
};
+DILIGENT_END_INTERFACE
#include "../../../Primitives/interface/UndefInterfaceHelperMacros.h"
@@ -230,11 +231,6 @@ struct IQueryVtbl
struct IQueryMethods Query;
};
-typedef struct IQuery
-{
- struct IQueryVtbl* pVtbl;
-} IQuery;
-
// clang-format off
# define IQuery_GetDesc(This) (const struct QueryDesc*)IDeviceObject_GetDesc(This)
diff --git a/Graphics/GraphicsEngine/interface/RenderDevice.h b/Graphics/GraphicsEngine/interface/RenderDevice.h
index 47720d04..c60c1422 100644
--- a/Graphics/GraphicsEngine/interface/RenderDevice.h
+++ b/Graphics/GraphicsEngine/interface/RenderDevice.h
@@ -64,7 +64,7 @@ static const INTERFACE_ID IID_RenderDevice =
// clang-format off
/// Render device interface
-DILIGENT_INTERFACE(IRenderDevice, IObject)
+DILIGENT_BEGIN_INTERFACE(IRenderDevice, IObject)
{
/// Creates a new buffer object
@@ -236,6 +236,7 @@ DILIGENT_INTERFACE(IRenderDevice, IObject)
/// so the application should not call Release().
VIRTUAL IEngineFactory* METHOD(GetEngineFactory)(THIS) CONST PURE;
};
+DILIGENT_END_INTERFACE
#include "../../../Primitives/interface/UndefInterfaceHelperMacros.h"
@@ -249,11 +250,6 @@ struct IRenderDeviceVtbl
struct IRenderDeviceMethods RenderDevice;
};
-typedef struct IRenderDevice
-{
- struct IRenderDeviceVtbl* pVtbl;
-} IRenderDevice;
-
// clang-format off
# define IRenderDevice_CreateBuffer(This, ...) CALL_IFACE_METHOD(RenderDevice, CreateBuffer, This, __VA_ARGS__)
diff --git a/Graphics/GraphicsEngine/interface/ResourceMapping.h b/Graphics/GraphicsEngine/interface/ResourceMapping.h
index 583f6f1c..62a81214 100644
--- a/Graphics/GraphicsEngine/interface/ResourceMapping.h
+++ b/Graphics/GraphicsEngine/interface/ResourceMapping.h
@@ -101,7 +101,7 @@ typedef struct ResourceMappingDesc ResourceMappingDesc;
/// This interface provides mapping between literal names and resource pointers.
/// It is created by IRenderDevice::CreateResourceMapping().
/// \remarks Resource mapping holds strong references to all objects it keeps.
-DILIGENT_INTERFACE(IResourceMapping, IObject)
+DILIGENT_BEGIN_INTERFACE(IResourceMapping, IObject)
{
/// Adds a resource to the mapping.
@@ -164,6 +164,7 @@ DILIGENT_INTERFACE(IResourceMapping, IObject)
/// Returns the size of the resource mapping, i.e. the number of objects.
VIRTUAL size_t METHOD(GetSize)(THIS) PURE;
};
+DILIGENT_END_INTERFACE
#include "../../../Primitives/interface/UndefInterfaceHelperMacros.h"
@@ -177,11 +178,6 @@ struct IResourceMappingVtbl
struct IResourceMappingMethods ResourceMapping;
};
-typedef struct IResourceMapping
-{
- struct IResourceMappingVtbl* pVtbl;
-} IResourceMapping;
-
// clang-format off
# define IResourceMapping_AddResource(This, ...) CALL_IFACE_METHOD(ResourceMapping, AddResource, This, __VA_ARGS__)
diff --git a/Graphics/GraphicsEngine/interface/Sampler.h b/Graphics/GraphicsEngine/interface/Sampler.h
index b265ff8e..721ed33f 100644
--- a/Graphics/GraphicsEngine/interface/Sampler.h
+++ b/Graphics/GraphicsEngine/interface/Sampler.h
@@ -183,13 +183,14 @@ typedef struct SamplerDesc SamplerDesc;
/// The interface holds the sampler state that can be used to perform texture filtering.
/// To create a sampler, call IRenderDevice::CreateSampler(). To use a sampler,
/// call ITextureView::SetSampler().
-DILIGENT_INTERFACE(ISampler, IDeviceObject)
+DILIGENT_BEGIN_INTERFACE(ISampler, IDeviceObject)
{
#if DILIGENT_CPP_INTERFACE
/// Returns the sampler description used to create the object
virtual const SamplerDesc& GetDesc() const override = 0;
#endif
};
+DILIGENT_END_INTERFACE
#endif
diff --git a/Graphics/GraphicsEngine/interface/Shader.h b/Graphics/GraphicsEngine/interface/Shader.h
index b4a28c20..39849a22 100644
--- a/Graphics/GraphicsEngine/interface/Shader.h
+++ b/Graphics/GraphicsEngine/interface/Shader.h
@@ -90,13 +90,13 @@ static const INTERFACE_ID IID_IShaderSourceInputStreamFactory =
/// Shader source stream factory interface
-DILIGENT_INTERFACE(IShaderSourceInputStreamFactory, IObject)
+DILIGENT_BEGIN_INTERFACE(IShaderSourceInputStreamFactory, IObject)
{
VIRTUAL void METHOD(CreateInputStream)(THIS_
const Char* Name,
IFileStream** ppStream) PURE;
};
-
+DILIGENT_END_INTERFACE
#include "../../../Primitives/interface/UndefInterfaceHelperMacros.h"
@@ -110,11 +110,6 @@ struct IShaderSourceInputStreamFactoryVtbl
struct IShaderSourceInputStreamFactoryMethods ShaderSourceInputStreamFactory;
};
-typedef struct IShaderSourceInputStreamFactory
-{
- struct IShaderSourceInputStreamFactoryVtbl* pVtbl;
-} IShaderSourceInputStreamFactory;
-
# define IShaderSourceInputStreamFactory_CreateInputStream(This, ...) CALL_IFACE_METHOD(ShaderSourceInputStreamFactory, CreateInputStream, This, __VA_ARGS__)
#endif
@@ -322,7 +317,7 @@ typedef struct ShaderResourceDesc ShaderResourceDesc;
// clang-format off
/// Shader interface
-DILIGENT_INTERFACE(IShader, IDeviceObject)
+DILIGENT_BEGIN_INTERFACE(IShader, IDeviceObject)
{
#if DILIGENT_CPP_INTERFACE
/// Returns the shader description
@@ -337,7 +332,7 @@ DILIGENT_INTERFACE(IShader, IDeviceObject)
Uint32 Index,
ShaderResourceDesc REF ResourceDesc) CONST PURE;
};
-
+DILIGENT_END_INTERFACE
#include "../../../Primitives/interface/UndefInterfaceHelperMacros.h"
@@ -352,11 +347,6 @@ struct IShaderVtbl
struct IShaderMethods Shader;
};
-typedef struct IShader
-{
- struct IShaderVtbl* pVtbl;
-} IShader;
-
// clang-format off
# define IShader_GetDesc(This) (const struct ShaderDesc*)IDeviceObject_GetDesc(This)
diff --git a/Graphics/GraphicsEngine/interface/ShaderResourceBinding.h b/Graphics/GraphicsEngine/interface/ShaderResourceBinding.h
index 07aee7fb..8a314f70 100644
--- a/Graphics/GraphicsEngine/interface/ShaderResourceBinding.h
+++ b/Graphics/GraphicsEngine/interface/ShaderResourceBinding.h
@@ -52,7 +52,7 @@ static const INTERFACE_ID IID_ShaderResourceBinding =
// clang-format off
/// Shader resource binding interface
-DILIGENT_INTERFACE(IShaderResourceBinding, IObject)
+DILIGENT_BEGIN_INTERFACE(IShaderResourceBinding, IObject)
{
/// Returns pointer to the referenced buffer object.
@@ -127,6 +127,7 @@ DILIGENT_INTERFACE(IShaderResourceBinding, IObject)
VIRTUAL void METHOD(InitializeStaticResources)(THIS_
const struct IPipelineState* pPipelineState DEFAULT_VALUE(nullptr)) PURE;
};
+DILIGENT_END_INTERFACE
#include "../../../Primitives/interface/UndefInterfaceHelperMacros.h"
@@ -140,11 +141,6 @@ struct IShaderResourceBindingVtbl
struct IShaderResourceBindingMethods ShaderResourceBinding;
};
-typedef struct IShaderResourceBinding
-{
- struct IShaderResourceBindingVtbl* pVtbl;
-} IShaderResourceBinding;
-
// clang-format off
# define IShaderResourceBinding_GetPipelineState(This) CALL_IFACE_METHOD(ShaderResourceBinding, GetPipelineState, This)
diff --git a/Graphics/GraphicsEngine/interface/ShaderResourceVariable.h b/Graphics/GraphicsEngine/interface/ShaderResourceVariable.h
index 2f86261e..777ddaf2 100644
--- a/Graphics/GraphicsEngine/interface/ShaderResourceVariable.h
+++ b/Graphics/GraphicsEngine/interface/ShaderResourceVariable.h
@@ -112,7 +112,7 @@ DILIGENT_TYPED_ENUM(BIND_SHADER_RESOURCES_FLAGS, Uint32)
// clang-format off
/// Shader resource variable
-DILIGENT_INTERFACE(IShaderResourceVariable, IObject)
+DILIGENT_BEGIN_INTERFACE(IShaderResourceVariable, IObject)
{
/// Binds resource to the variable
@@ -153,6 +153,7 @@ DILIGENT_INTERFACE(IShaderResourceVariable, IObject)
VIRTUAL bool METHOD(IsBound)(THIS_
Uint32 ArrayIndex) CONST PURE;
};
+DILIGENT_END_INTERFACE
#include "../../../Primitives/interface/UndefInterfaceHelperMacros.h"
@@ -166,11 +167,6 @@ struct IShaderResourceVariableVtbl
struct IShaderResourceVariableMethods ShaderResourceVariable;
};
-typedef struct IShaderResourceVariable
-{
- struct IShaderResourceVariableVtbl* pVtbl;
-} IShaderResourceVariable;
-
// clang-format off
# define IShaderResourceVariable_Set(This, ...) CALL_IFACE_METHOD(ShaderResourceVariable, Set, This, __VA_ARGS__)
diff --git a/Graphics/GraphicsEngine/interface/SwapChain.h b/Graphics/GraphicsEngine/interface/SwapChain.h
index 9ea831bd..eea56ea7 100644
--- a/Graphics/GraphicsEngine/interface/SwapChain.h
+++ b/Graphics/GraphicsEngine/interface/SwapChain.h
@@ -50,7 +50,7 @@ static const INTERFACE_ID IID_SwapChain =
/// Swap chain interface
/// The swap chain is created by a platform-dependent function
-DILIGENT_INTERFACE(ISwapChain, IObject)
+DILIGENT_BEGIN_INTERFACE(ISwapChain, IObject)
{
/// Presents a rendered image to the user
VIRTUAL void METHOD(Present)(THIS_
@@ -94,6 +94,7 @@ DILIGENT_INTERFACE(ISwapChain, IObject)
/// so Release() must not be called.
VIRTUAL ITextureView* METHOD(GetDepthBufferDSV)(THIS) PURE;
};
+DILIGENT_END_INTERFACE
#include "../../../Primitives/interface/UndefInterfaceHelperMacros.h"
@@ -107,11 +108,6 @@ struct ISwapChainVtbl
struct ISwapChainMethods SwapChain;
};
-typedef struct ISwapChain
-{
- struct ISwapChainVtbl* pVtbl;
-} ISwapChain;
-
// clang-format off
# define ISwapChain_Present(This, ...) CALL_IFACE_METHOD(SwapChain, Present, This, __VA_ARGS__)
diff --git a/Graphics/GraphicsEngine/interface/Texture.h b/Graphics/GraphicsEngine/interface/Texture.h
index c58da40b..dbc27a20 100644
--- a/Graphics/GraphicsEngine/interface/Texture.h
+++ b/Graphics/GraphicsEngine/interface/Texture.h
@@ -314,7 +314,7 @@ typedef struct MappedTextureSubresource MappedTextureSubresource;
/// Texture inteface
-DILIGENT_INTERFACE(ITexture, IDeviceObject)
+DILIGENT_BEGIN_INTERFACE(ITexture, IDeviceObject)
{
#if DILIGENT_CPP_INTERFACE
/// Returns the texture description used to create the object
@@ -375,6 +375,7 @@ DILIGENT_INTERFACE(ITexture, IDeviceObject)
/// Returns the internal texture state
VIRTUAL RESOURCE_STATE METHOD(GetState)(THIS) CONST PURE;
};
+DILIGENT_END_INTERFACE
#include "../../../Primitives/interface/UndefInterfaceHelperMacros.h"
@@ -389,11 +390,6 @@ struct ITextureVtbl
struct ITextureMethods Texture;
};
-typedef struct ITexture
-{
- struct ITextureVtbl* pVtbl;
-} ITexture;
-
// clang-format off
# define ITexture_GetDesc(This) (const struct TextureDesc*)IDeviceObject_GetDesc(This)
diff --git a/Graphics/GraphicsEngine/interface/TextureView.h b/Graphics/GraphicsEngine/interface/TextureView.h
index 44af2485..a577349b 100644
--- a/Graphics/GraphicsEngine/interface/TextureView.h
+++ b/Graphics/GraphicsEngine/interface/TextureView.h
@@ -197,7 +197,7 @@ typedef struct TextureViewDesc TextureViewDesc;
/// will not be destroyed until all views are released.
/// The texture view will also keep a strong reference to the texture sampler,
/// if any is set.
-DILIGENT_INTERFACE(ITextureView, IDeviceObject)
+DILIGENT_BEGIN_INTERFACE(ITextureView, IDeviceObject)
{
#if DILIGENT_CPP_INTERFACE
/// Returns the texture view description used to create the object
@@ -223,6 +223,7 @@ DILIGENT_INTERFACE(ITextureView, IDeviceObject)
/// so Release() must not be called.
VIRTUAL struct ITexture* METHOD(GetTexture)(THIS) PURE;
};
+DILIGENT_END_INTERFACE
#include "../../../Primitives/interface/UndefInterfaceHelperMacros.h"
@@ -237,11 +238,6 @@ struct ITextureViewVtbl
struct ITextureViewMethods TextureView;
};
-typedef struct ITextureView
-{
- struct ITextureViewVtbl* pVtbl;
-} ITextureView;
-
# define ITextureView_GetDesc(This) (const struct TextureViewDesc*)IDeviceObject_GetDesc(This)
// clang-format off