From de9b8692d538f4249e30dd979c3ebac45120be41 Mon Sep 17 00:00:00 2001 From: assiduous Date: Tue, 28 Jan 2020 12:30:39 -0800 Subject: Reworked interface definitions to use DILIGENT_BEGIN_INTERFACE/DILIGENT_END_INTERFACE pair --- Graphics/GraphicsEngine/interface/Buffer.h | 8 ++------ Graphics/GraphicsEngine/interface/BufferView.h | 8 ++------ Graphics/GraphicsEngine/interface/DeviceContext.h | 8 ++------ Graphics/GraphicsEngine/interface/DeviceObject.h | 8 ++------ Graphics/GraphicsEngine/interface/EngineFactory.h | 8 ++------ Graphics/GraphicsEngine/interface/Fence.h | 8 ++------ Graphics/GraphicsEngine/interface/PipelineState.h | 8 ++------ Graphics/GraphicsEngine/interface/Query.h | 8 ++------ Graphics/GraphicsEngine/interface/RenderDevice.h | 8 ++------ Graphics/GraphicsEngine/interface/ResourceMapping.h | 8 ++------ Graphics/GraphicsEngine/interface/Sampler.h | 3 ++- Graphics/GraphicsEngine/interface/Shader.h | 18 ++++-------------- .../GraphicsEngine/interface/ShaderResourceBinding.h | 8 ++------ .../GraphicsEngine/interface/ShaderResourceVariable.h | 8 ++------ Graphics/GraphicsEngine/interface/SwapChain.h | 8 ++------ Graphics/GraphicsEngine/interface/Texture.h | 8 ++------ Graphics/GraphicsEngine/interface/TextureView.h | 8 ++------ Graphics/GraphicsEngineD3D11/interface/BufferD3D11.h | 8 ++------ .../GraphicsEngineD3D11/interface/BufferViewD3D11.h | 8 ++------ .../GraphicsEngineD3D11/interface/DeviceContextD3D11.h | 8 ++------ .../GraphicsEngineD3D11/interface/EngineFactoryD3D11.h | 8 ++------ .../GraphicsEngineD3D11/interface/PipelineStateD3D11.h | 8 ++------ Graphics/GraphicsEngineD3D11/interface/QueryD3D11.h | 8 ++------ .../GraphicsEngineD3D11/interface/RenderDeviceD3D11.h | 8 ++------ Graphics/GraphicsEngineD3D11/interface/SamplerD3D11.h | 8 ++------ Graphics/GraphicsEngineD3D11/interface/ShaderD3D11.h | 8 ++------ .../interface/ShaderResourceBindingD3D11.h | 7 ++++--- .../GraphicsEngineD3D11/interface/SwapChainD3D11.h | 8 ++------ Graphics/GraphicsEngineD3D11/interface/TextureD3D11.h | 8 ++------ .../GraphicsEngineD3D11/interface/TextureViewD3D11.h | 8 ++------ Graphics/GraphicsEngineD3D12/interface/BufferD3D12.h | 8 ++------ .../GraphicsEngineD3D12/interface/BufferViewD3D12.h | 8 ++------ .../GraphicsEngineD3D12/interface/CommandQueueD3D12.h | 8 ++------ .../GraphicsEngineD3D12/interface/DeviceContextD3D12.h | 8 ++------ .../GraphicsEngineD3D12/interface/EngineFactoryD3D12.h | 8 ++------ Graphics/GraphicsEngineD3D12/interface/FenceD3D12.h | 8 ++------ .../GraphicsEngineD3D12/interface/PipelineStateD3D12.h | 9 ++------- Graphics/GraphicsEngineD3D12/interface/QueryD3D12.h | 8 ++------ .../GraphicsEngineD3D12/interface/RenderDeviceD3D12.h | 8 ++------ Graphics/GraphicsEngineD3D12/interface/SamplerD3D12.h | 8 ++------ Graphics/GraphicsEngineD3D12/interface/ShaderD3D12.h | 3 ++- .../interface/ShaderResourceBindingD3D12.h | 7 ++++--- .../GraphicsEngineD3D12/interface/SwapChainD3D12.h | 8 ++------ Graphics/GraphicsEngineD3D12/interface/TextureD3D12.h | 8 ++------ .../GraphicsEngineD3D12/interface/TextureViewD3D12.h | 9 ++------- Graphics/GraphicsEngineD3DBase/interface/ShaderD3D.h | 8 ++------ Graphics/GraphicsEngineOpenGL/interface/BufferGL.h | 8 ++------ Graphics/GraphicsEngineOpenGL/interface/BufferViewGL.h | 3 ++- .../GraphicsEngineOpenGL/interface/DeviceContextGL.h | 8 ++------ .../interface/EngineFactoryOpenGL.h | 8 ++------ Graphics/GraphicsEngineOpenGL/interface/FenceGL.h | 3 ++- .../GraphicsEngineOpenGL/interface/PipelineStateGL.h | 3 ++- Graphics/GraphicsEngineOpenGL/interface/QueryGL.h | 8 ++------ .../GraphicsEngineOpenGL/interface/RenderDeviceGL.h | 9 ++------- Graphics/GraphicsEngineOpenGL/interface/SamplerGL.h | 3 ++- Graphics/GraphicsEngineOpenGL/interface/ShaderGL.h | 8 ++------ .../interface/ShaderResourceBindingGL.h | 8 ++------ Graphics/GraphicsEngineOpenGL/interface/SwapChainGL.h | 8 ++------ Graphics/GraphicsEngineOpenGL/interface/TextureGL.h | 8 ++------ .../GraphicsEngineOpenGL/interface/TextureViewGL.h | 3 ++- Graphics/GraphicsEngineVulkan/interface/BufferViewVk.h | 9 ++------- Graphics/GraphicsEngineVulkan/interface/BufferVk.h | 8 ++------ .../GraphicsEngineVulkan/interface/CommandQueueVk.h | 8 ++------ .../GraphicsEngineVulkan/interface/DeviceContextVk.h | 8 ++------ .../GraphicsEngineVulkan/interface/EngineFactoryVk.h | 8 ++------ Graphics/GraphicsEngineVulkan/interface/FenceVk.h | 3 ++- .../GraphicsEngineVulkan/interface/PipelineStateVk.h | 8 ++------ Graphics/GraphicsEngineVulkan/interface/QueryVk.h | 3 ++- .../GraphicsEngineVulkan/interface/RenderDeviceVk.h | 8 ++------ Graphics/GraphicsEngineVulkan/interface/SamplerVk.h | 8 ++------ .../interface/ShaderResourceBindingVk.h | 8 ++------ Graphics/GraphicsEngineVulkan/interface/SwapChainVk.h | 8 ++------ .../GraphicsEngineVulkan/interface/TextureViewVk.h | 8 ++------ Graphics/GraphicsEngineVulkan/interface/TextureVk.h | 8 ++------ .../interface/HLSL2GLSLConverter.h | 18 +++++------------- 75 files changed, 159 insertions(+), 418 deletions(-) (limited to 'Graphics') 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 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 diff --git a/Graphics/GraphicsEngineD3D12/interface/BufferD3D12.h b/Graphics/GraphicsEngineD3D12/interface/BufferD3D12.h index 26213214..568c6adb 100644 --- a/Graphics/GraphicsEngineD3D12/interface/BufferD3D12.h +++ b/Graphics/GraphicsEngineD3D12/interface/BufferD3D12.h @@ -45,7 +45,7 @@ static const INTERFACE_ID IID_BufferD3D12 = // clang-format off /// Exposes Direct3D12-specific functionality of a buffer object. -DILIGENT_INTERFACE(IBufferD3D12, IBuffer) +DILIGENT_BEGIN_INTERFACE(IBufferD3D12, IBuffer) { /// Returns a pointer to the ID3D12Resource interface of the internal Direct3D12 object. @@ -71,6 +71,7 @@ DILIGENT_INTERFACE(IBufferD3D12, IBuffer) /// returns D3D12_RESOURCE_STATE_COMMON (0). VIRTUAL D3D12_RESOURCE_STATES METHOD(GetD3D12ResourceState)(THIS) CONST PURE; }; +DILIGENT_END_INTERFACE #include "../../../Primitives/interface/UndefInterfaceHelperMacros.h" @@ -84,11 +85,6 @@ struct IBufferD3D12Vtbl struct IBufferD3D12Methods BufferD3D12; }; -typedef struct IBufferD3D12 -{ - struct IBufferD3D12Vtbl* pVtbl; -} IBufferD3D12; - # define IBufferD3D12_GetD3D12Buffer(This, ...) CALL_IFACE_METHOD(BufferD3D12, GetD3D12Buffer, This, __VA_ARGS__) # define IBufferD3D12_SetD3D12ResourceState(This, ...) CALL_IFACE_METHOD(BufferD3D12, SetD3D12ResourceState, This, __VA_ARGS__) # define IBufferD3D12_GetD3D12ResourceState(This) CALL_IFACE_METHOD(BufferD3D12, GetD3D12ResourceState, This) diff --git a/Graphics/GraphicsEngineD3D12/interface/BufferViewD3D12.h b/Graphics/GraphicsEngineD3D12/interface/BufferViewD3D12.h index 0dc84a9b..902986e7 100644 --- a/Graphics/GraphicsEngineD3D12/interface/BufferViewD3D12.h +++ b/Graphics/GraphicsEngineD3D12/interface/BufferViewD3D12.h @@ -42,11 +42,12 @@ static const INTERFACE_ID IID_BufferViewD3D12 = #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" /// Exposes Direct3D12-specific functionality of a buffer view object. -DILIGENT_INTERFACE(IBufferViewD3D12, IBufferView) +DILIGENT_BEGIN_INTERFACE(IBufferViewD3D12, IBufferView) { /// Returns CPU descriptor handle of the buffer view. VIRTUAL D3D12_CPU_DESCRIPTOR_HANDLE METHOD(GetCPUDescriptorHandle)(THIS) PURE; }; +DILIGENT_END_INTERFACE #include "../../../Primitives/interface/UndefInterfaceHelperMacros.h" @@ -60,11 +61,6 @@ struct IBufferViewD3D12Vtbl struct IBufferViewD3D12Methods BufferViewD3D12; }; -typedef struct IBufferViewD3D12 -{ - struct IBufferViewD3D12Vtbl* pVtbl; -} IBufferViewD3D12; - # define IBufferViewD3D12_GetCPUDescriptorHandle(This) CALL_IFACE_METHOD(BufferViewD3D12, GetCPUDescriptorHandle, This) #endif diff --git a/Graphics/GraphicsEngineD3D12/interface/CommandQueueD3D12.h b/Graphics/GraphicsEngineD3D12/interface/CommandQueueD3D12.h index b87b2b78..0f612308 100644 --- a/Graphics/GraphicsEngineD3D12/interface/CommandQueueD3D12.h +++ b/Graphics/GraphicsEngineD3D12/interface/CommandQueueD3D12.h @@ -44,7 +44,7 @@ static const INTERFACE_ID IID_CommandQueueD3D12 = // clang-format off /// Command queue interface -DILIGENT_INTERFACE(ICommandQueueD3D12, IObject) +DILIGENT_BEGIN_INTERFACE(ICommandQueueD3D12, IObject) { /// Returns the fence value that will be signaled next time VIRTUAL Uint64 METHOD(GetNextFenceValue)(THIS) CONST PURE; @@ -69,6 +69,7 @@ DILIGENT_INTERFACE(ICommandQueueD3D12, IObject) ID3D12Fence* pFence, Uint64 Value) PURE; }; +DILIGENT_END_INTERFACE #include "../../../Primitives/interface/UndefInterfaceHelperMacros.h" @@ -82,11 +83,6 @@ struct ICommandQueueD3D12Vtbl struct ICommandQueueD3D12Methods CommandQueueD3D12; }; -typedef struct ICommandQueueD3D12 -{ - struct ICommandQueueD3D12Vtbl* pVtbl; -} ICommandQueueD3D12; - // clang-format off # define ICommandQueueD3D12_GetNextFenceValue(This) CALL_IFACE_METHOD(CommandQueueD3D12, GetNextFenceValue, This) diff --git a/Graphics/GraphicsEngineD3D12/interface/DeviceContextD3D12.h b/Graphics/GraphicsEngineD3D12/interface/DeviceContextD3D12.h index 18018d94..61856849 100644 --- a/Graphics/GraphicsEngineD3D12/interface/DeviceContextD3D12.h +++ b/Graphics/GraphicsEngineD3D12/interface/DeviceContextD3D12.h @@ -45,7 +45,7 @@ static const INTERFACE_ID IID_DeviceContextD3D12 = // clang-format off /// Exposes Direct3D12-specific functionality of a device context. -DILIGENT_INTERFACE(IDeviceContextD3D12, IDeviceContext) +DILIGENT_BEGIN_INTERFACE(IDeviceContextD3D12, IDeviceContext) { /// Transitions internal D3D12 texture object to a specified state @@ -103,6 +103,7 @@ DILIGENT_INTERFACE(IDeviceContextD3D12, IDeviceContext) /// Unlocks the command queue that was previously locked by IDeviceContextD3D12::LockCommandQueue(). VIRTUAL void METHOD(UnlockCommandQueue)(THIS) PURE; }; +DILIGENT_END_INTERFACE #include "../../../Primitives/interface/UndefInterfaceHelperMacros.h" @@ -117,11 +118,6 @@ struct IDeviceContextD3D12Vtbl struct IDeviceContextD3D12Methods DeviceContextD3D12; }; -typedef struct IDeviceContextD3D12 -{ - struct IDeviceContextD3D12Vtbl* pVtbl; -} IDeviceContextD3D12; - // clang-format off # define IDeviceContextD3D12_TransitionTextureState(This, ...) CALL_IFACE_METHOD(DeviceContextD3D12, TransitionTextureState,This, __VA_ARGS__) diff --git a/Graphics/GraphicsEngineD3D12/interface/EngineFactoryD3D12.h b/Graphics/GraphicsEngineD3D12/interface/EngineFactoryD3D12.h index f878820a..eff03ab3 100644 --- a/Graphics/GraphicsEngineD3D12/interface/EngineFactoryD3D12.h +++ b/Graphics/GraphicsEngineD3D12/interface/EngineFactoryD3D12.h @@ -53,7 +53,7 @@ static const INTERFACE_ID IID_EngineFactoryD3D12 = // clang-format off /// Engine factory for Direct3D12 rendering backend -DILIGENT_INTERFACE(IEngineFactoryD3D12, IEngineFactory) +DILIGENT_BEGIN_INTERFACE(IEngineFactoryD3D12, IEngineFactory) { /// Loads D3D12 DLL and entry points. @@ -170,6 +170,7 @@ DILIGENT_INTERFACE(IEngineFactoryD3D12, IEngineFactory) Uint32 REF NumDisplayModes, DisplayModeAttribs* DisplayModes) PURE; }; +DILIGENT_END_INTERFACE #include "../../../Primitives/interface/UndefInterfaceHelperMacros.h" @@ -184,11 +185,6 @@ struct IEngineFactoryD3D12Vtbl struct IEngineFactoryD3D12Methods EngineFactoryD3D12; }; -typedef struct IEngineFactoryD3D12 -{ - struct IEngineFactoryD3D12Vtbl* pVtbl; -} IEngineFactoryD3D12; - // clang-format off # define IEngineFactoryD3D12_LoadD3D12(This, ...) CALL_IFACE_METHOD(EngineFactoryD3D12, LoadD3D12, This, __VA_ARGS__) diff --git a/Graphics/GraphicsEngineD3D12/interface/FenceD3D12.h b/Graphics/GraphicsEngineD3D12/interface/FenceD3D12.h index 6cad4f48..dd25dfb3 100644 --- a/Graphics/GraphicsEngineD3D12/interface/FenceD3D12.h +++ b/Graphics/GraphicsEngineD3D12/interface/FenceD3D12.h @@ -44,7 +44,7 @@ static const INTERFACE_ID IID_FenceD3D12 = // clang-format off /// Exposes Direct3D12-specific functionality of a fence object. -DILIGENT_INTERFACE(IFenceD3D12, IFence) +DILIGENT_BEGIN_INTERFACE(IFenceD3D12, IFence) { /// Returns a pointer to the ID3D12Fence interface of the internal Direct3D12 object. @@ -56,6 +56,7 @@ DILIGENT_INTERFACE(IFenceD3D12, IFence) VIRTUAL void METHOD(WaitForCompletion)(THIS_ Uint64 Value) PURE; }; +DILIGENT_END_INTERFACE #include "../../../Primitives/interface/UndefInterfaceHelperMacros.h" @@ -71,11 +72,6 @@ struct IFenceD3D12Vtbl struct IFenceD3D12Methods FenceD3D12; }; -typedef struct IFenceD3D12 -{ - struct IFenceD3D12Vtbl* pVtbl; -} IFenceD3D12; - // clang-format off # define IFenceD3D12_GetD3D12Fence(This) CALL_IFACE_METHOD(FenceD3D12, GetD3D12Fence, This) diff --git a/Graphics/GraphicsEngineD3D12/interface/PipelineStateD3D12.h b/Graphics/GraphicsEngineD3D12/interface/PipelineStateD3D12.h index 2a289e42..e3539804 100644 --- a/Graphics/GraphicsEngineD3D12/interface/PipelineStateD3D12.h +++ b/Graphics/GraphicsEngineD3D12/interface/PipelineStateD3D12.h @@ -42,7 +42,7 @@ static const INTERFACE_ID IID_PipelineStateD3D12 = #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" /// Exposes Direct3D12-specific functionality of a pipeline state object. -DILIGENT_INTERFACE(IPipelineStateD3D12, IPipelineState) +DILIGENT_BEGIN_INTERFACE(IPipelineStateD3D12, IPipelineState) { /// Returns ID3D12PipelineState interface of the internal D3D12 pipeline state object object. @@ -56,7 +56,7 @@ DILIGENT_INTERFACE(IPipelineStateD3D12, IPipelineState) /// so Release() must not be called. VIRTUAL ID3D12RootSignature* METHOD(GetD3D12RootSignature)(THIS) CONST PURE; }; - +DILIGENT_END_INTERFACE #include "../../../Primitives/interface/UndefInterfaceHelperMacros.h" @@ -70,11 +70,6 @@ struct IPipelineStateD3D12Vtbl struct IPipelineStateD3D12Methods PipelineStateD3D12; }; -typedef struct IPipelineStateD3D12 -{ - struct IPipelineStateD3D12Vtbl* pVtbl; -} IPipelineStateD3D12; - // clang-format off # define IPipelineStateD3D12_GetD3D12PipelineState(This) CALL_IFACE_METHOD(PipelineStateD3D12, GetD3D12PipelineState, This) diff --git a/Graphics/GraphicsEngineD3D12/interface/QueryD3D12.h b/Graphics/GraphicsEngineD3D12/interface/QueryD3D12.h index 78c7165d..a660dc62 100644 --- a/Graphics/GraphicsEngineD3D12/interface/QueryD3D12.h +++ b/Graphics/GraphicsEngineD3D12/interface/QueryD3D12.h @@ -42,7 +42,7 @@ static const INTERFACE_ID IID_QueryD3D12 = #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" /// Exposes Direct3D12-specific functionality of a Query object. -DILIGENT_INTERFACE(IQueryD3D12, IQuery) +DILIGENT_BEGIN_INTERFACE(IQueryD3D12, IQuery) { /// Returns the Direct3D12 query heap that internal query object resides in. VIRTUAL ID3D12QueryHeap* METHOD(GetD3D12QueryHeap)(THIS) PURE; @@ -50,6 +50,7 @@ DILIGENT_INTERFACE(IQueryD3D12, IQuery) /// Returns the index of a query object in Direct3D12 query heap. VIRTUAL Uint32 METHOD(GetQueryHeapIndex)(THIS) CONST PURE; }; +DILIGENT_END_INTERFACE #include "../../../Primitives/interface/UndefInterfaceHelperMacros.h" @@ -63,11 +64,6 @@ struct IQueryD3D12Vtbl struct IQueryD3D12Methods QueryD3D12; }; -typedef struct IQueryD3D12 -{ - struct IQueryD3D12Vtbl* pVtbl; -} IQueryD3D12; - # define IQueryD3D12_GetD3D12QueryHeap(This) CALL_IFACE_METHOD(QueryD3D12, GetD3D12QueryHeap, This) # define IQueryD3D12_GetQueryHeapIndex(This) CALL_IFACE_METHOD(QueryD3D12, GetQueryHeapIndex, This) diff --git a/Graphics/GraphicsEngineD3D12/interface/RenderDeviceD3D12.h b/Graphics/GraphicsEngineD3D12/interface/RenderDeviceD3D12.h index f29dfff0..35ca2c09 100644 --- a/Graphics/GraphicsEngineD3D12/interface/RenderDeviceD3D12.h +++ b/Graphics/GraphicsEngineD3D12/interface/RenderDeviceD3D12.h @@ -44,7 +44,7 @@ static const INTERFACE_ID IID_RenderDeviceD3D12 = // clang-format off /// Exposes Direct3D12-specific functionality of a render device. -DILIGENT_INTERFACE(IRenderDeviceD3D12, IRenderDevice) +DILIGENT_BEGIN_INTERFACE(IRenderDeviceD3D12, IRenderDevice) { /// Returns ID3D12Device interface of the internal Direct3D12 device object. @@ -96,6 +96,7 @@ DILIGENT_INTERFACE(IRenderDeviceD3D12, IRenderDevice) RESOURCE_STATE InitialState, IBuffer** ppBuffer) PURE; }; +DILIGENT_END_INTERFACE #include "../../../Primitives/interface/UndefInterfaceHelperMacros.h" @@ -110,11 +111,6 @@ struct IRenderDeviceD3D12Vtbl struct IRenderDeviceD3D12Methods RenderDeviceD3D12; }; -typedef struct IRenderDeviceD3D12 -{ - struct IRenderDeviceD3D12Vtbl* pVtbl; -} IRenderDeviceD3D12; - // clang-format off # define IRenderDeviceD3D12_GetD3D12Device(This) CALL_IFACE_METHOD(RenderDeviceD3D12, GetD3D12Device, This) diff --git a/Graphics/GraphicsEngineD3D12/interface/SamplerD3D12.h b/Graphics/GraphicsEngineD3D12/interface/SamplerD3D12.h index a37d477a..399f653d 100644 --- a/Graphics/GraphicsEngineD3D12/interface/SamplerD3D12.h +++ b/Graphics/GraphicsEngineD3D12/interface/SamplerD3D12.h @@ -42,7 +42,7 @@ static const INTERFACE_ID IID_SamplerD3D12 = #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" /// Exposes Direct3D12-specific functionality of a sampler object. -DILIGENT_INTERFACE(ISamplerD3D12, ISampler) +DILIGENT_BEGIN_INTERFACE(ISamplerD3D12, ISampler) { /// Returns a CPU descriptor handle of the D3D12 sampler object @@ -50,6 +50,7 @@ DILIGENT_INTERFACE(ISamplerD3D12, ISampler) /// so Release() must not be called. VIRTUAL D3D12_CPU_DESCRIPTOR_HANDLE METHOD(GetCPUDescriptorHandle)(THIS) PURE; }; +DILIGENT_END_INTERFACE #include "../../../Primitives/interface/UndefInterfaceHelperMacros.h" @@ -63,11 +64,6 @@ struct ISamplerD3D12Vtbl struct ISamplerD3D12Methods SamplerD3D12; }; -typedef struct ISamplerD3D12 -{ - struct ISamplerD3D12Vtbl* pVtbl; -} ISamplerD3D12; - # define ISamplerD3D12_GetCPUDescriptorHandle(This) CALL_IFACE_METHOD(SamplerD3D12, GetCPUDescriptorHandle, This) #endif diff --git a/Graphics/GraphicsEngineD3D12/interface/ShaderD3D12.h b/Graphics/GraphicsEngineD3D12/interface/ShaderD3D12.h index 2027e0cd..a70d56bb 100644 --- a/Graphics/GraphicsEngineD3D12/interface/ShaderD3D12.h +++ b/Graphics/GraphicsEngineD3D12/interface/ShaderD3D12.h @@ -44,13 +44,14 @@ static const INTERFACE_ID IID_ShaderD3D12 = #if DILIGENT_CPP_INTERFACE /// Exposes Direct3D12-specific functionality of a shader object. -DILIGENT_INTERFACE(IShaderD3D12, IShaderD3D){ +DILIGENT_BEGIN_INTERFACE(IShaderD3D12, IShaderD3D){ /// Returns a pointer to the ID3D12DeviceChild interface of the internal Direct3D12 object. /// The method does *NOT* call AddRef() on the returned interface, /// so Release() must not be called. //virtual ID3D12DeviceChild* GetD3D12Shader() = 0; }; +DILIGENT_END_INTERFACE #endif diff --git a/Graphics/GraphicsEngineD3D12/interface/ShaderResourceBindingD3D12.h b/Graphics/GraphicsEngineD3D12/interface/ShaderResourceBindingD3D12.h index b744ecc3..587ffa3d 100644 --- a/Graphics/GraphicsEngineD3D12/interface/ShaderResourceBindingD3D12.h +++ b/Graphics/GraphicsEngineD3D12/interface/ShaderResourceBindingD3D12.h @@ -44,7 +44,8 @@ static const INTERFACE_ID IID_ShaderResourceBindingD3D12 = #if DILIGENT_CPP_INTERFACE /// Exposes Direct3D12-specific functionality of a shader resource binding. -DILIGENT_INTERFACE(IShaderResourceBindingD3D12, IShaderResourceBinding){}; +DILIGENT_BEGIN_INTERFACE(IShaderResourceBindingD3D12, IShaderResourceBinding){}; +DILIGENT_END_INTERFACE #endif @@ -60,10 +61,10 @@ struct IShaderResourceBindingD3D12Vtbl //struct IShaderResourceBindingD3D12Methods ShaderResourceBindingD3D12; }; -struct IShaderResourceBindingD3D12 +typedef struct IShaderResourceBindingD3D12 { struct IShaderResourceBindingD3D12Vtbl* pVtbl; -}; +} IShaderResourceBindingD3D12; #endif diff --git a/Graphics/GraphicsEngineD3D12/interface/SwapChainD3D12.h b/Graphics/GraphicsEngineD3D12/interface/SwapChainD3D12.h index afe58928..42a515e4 100644 --- a/Graphics/GraphicsEngineD3D12/interface/SwapChainD3D12.h +++ b/Graphics/GraphicsEngineD3D12/interface/SwapChainD3D12.h @@ -45,7 +45,7 @@ static const INTERFACE_ID IID_SwapChainD3D12 = #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" /// Exposes Direct3D12-specific functionality of a swap chain. -DILIGENT_INTERFACE(ISwapChainD3D12, ISwapChain) +DILIGENT_BEGIN_INTERFACE(ISwapChainD3D12, ISwapChain) { /// Returns a pointer to the IDXGISwapChain interface of the internal DXGI object. @@ -53,6 +53,7 @@ DILIGENT_INTERFACE(ISwapChainD3D12, ISwapChain) /// so Release() must not be called. VIRTUAL IDXGISwapChain* METHOD(GetDXGISwapChain)(THIS) PURE; }; +DILIGENT_END_INTERFACE #include "../../../Primitives/interface/UndefInterfaceHelperMacros.h" @@ -66,11 +67,6 @@ struct ISwapChainD3D12Vtbl struct ISwapChainD3D12Methods SwapChainD3D12; }; -typedef struct ISwapChainD3D12 -{ - struct ISwapChainD3D12Vtbl* pVtbl; -} ISwapChainD3D12; - // clang-format off # define ISwapChainD3D12_GetDXGISwapChain(This) CALL_IFACE_METHOD(SwapChainD3D12, GetDXGISwapChain, This) diff --git a/Graphics/GraphicsEngineD3D12/interface/TextureD3D12.h b/Graphics/GraphicsEngineD3D12/interface/TextureD3D12.h index e2bfa4cc..3689b992 100644 --- a/Graphics/GraphicsEngineD3D12/interface/TextureD3D12.h +++ b/Graphics/GraphicsEngineD3D12/interface/TextureD3D12.h @@ -44,7 +44,7 @@ static const INTERFACE_ID IID_TextureD3D12 = // clang-format off /// Exposes Direct3D12-specific functionality of a texture object. -DILIGENT_INTERFACE(ITextureD3D12, ITexture) +DILIGENT_BEGIN_INTERFACE(ITextureD3D12, ITexture) { /// Returns a pointer to the ID3D12Resource interface of the internal Direct3D12 object. @@ -63,6 +63,7 @@ DILIGENT_INTERFACE(ITextureD3D12, ITexture) /// returns D3D12_RESOURCE_STATE_COMMON (0). VIRTUAL D3D12_RESOURCE_STATES METHOD(GetD3D12ResourceState)(THIS) CONST PURE; }; +DILIGENT_END_INTERFACE #include "../../../Primitives/interface/UndefInterfaceHelperMacros.h" @@ -78,11 +79,6 @@ struct ITextureD3D12Vtbl struct ITextureD3D12Methods TextureD3D12; }; -typedef struct ITextureD3D12 -{ - struct ITextureD3D12Vtbl* pVtbl; -} ITextureD3D12; - // clang-format off # define ITextureD3D12_GetD3D12Texture(This) CALL_IFACE_METHOD(TextureD3D12, GetD3D12Texture, This) diff --git a/Graphics/GraphicsEngineD3D12/interface/TextureViewD3D12.h b/Graphics/GraphicsEngineD3D12/interface/TextureViewD3D12.h index 461c5631..77c0b1b8 100644 --- a/Graphics/GraphicsEngineD3D12/interface/TextureViewD3D12.h +++ b/Graphics/GraphicsEngineD3D12/interface/TextureViewD3D12.h @@ -42,12 +42,12 @@ static const INTERFACE_ID IID_TextureViewD3D12 = #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" /// Exposes Direct3D12-specific functionality of a texture view object. -DILIGENT_INTERFACE(ITextureViewD3D12, ITextureView) +DILIGENT_BEGIN_INTERFACE(ITextureViewD3D12, ITextureView) { /// Returns CPU descriptor handle of the texture view. VIRTUAL D3D12_CPU_DESCRIPTOR_HANDLE METHOD(GetCPUDescriptorHandle)(THIS) PURE; }; - +DILIGENT_END_INTERFACE #include "../../../Primitives/interface/UndefInterfaceHelperMacros.h" @@ -61,11 +61,6 @@ struct ITextureViewD3D12Vtbl struct ITextureViewD3D12Methods TextureViewD3D12; }; -typedef struct ITextureViewD3D12 -{ - struct ITextureViewD3D12Vtbl* pVtbl; -} ITextureViewD3D12; - # define ITextureViewD3D12_GetCPUDescriptorHandle(This) CALL_IFACE_METHOD(TextureViewD3D12, GetCPUDescriptorHandle, This) #endif diff --git a/Graphics/GraphicsEngineD3DBase/interface/ShaderD3D.h b/Graphics/GraphicsEngineD3DBase/interface/ShaderD3D.h index b5ef72b9..4e03354f 100644 --- a/Graphics/GraphicsEngineD3DBase/interface/ShaderD3D.h +++ b/Graphics/GraphicsEngineD3DBase/interface/ShaderD3D.h @@ -57,13 +57,14 @@ typedef struct HLSLShaderResourceDesc HLSLShaderResourceDesc; // clang-format off /// Exposes Direct3D-specific functionality of a shader object. -DILIGENT_INTERFACE(IShaderD3D, IShader) +DILIGENT_BEGIN_INTERFACE(IShaderD3D, IShader) { /// Returns HLSL shader resource description VIRTUAL void METHOD(GetHLSLResource)(THIS_ Uint32 Index, HLSLShaderResourceDesc REF ResourceDesc) CONST PURE; }; +DILIGENT_END_INTERFACE #include "../../../Primitives/interface/UndefInterfaceHelperMacros.h" @@ -78,11 +79,6 @@ struct IShaderD3DVtbl struct IShaderD3DMethods ShaderD3D; }; -typedef struct IShaderD3D -{ - struct IShaderD3DVtbl* pVtbl; -} IShaderD3D; - // clang-format off # define IShaderD3D_GetHLSLResource(This, ...) CALL_IFACE_METHOD(ShaderD3D, GetHLSLResource, This, __VA_ARGS__) diff --git a/Graphics/GraphicsEngineOpenGL/interface/BufferGL.h b/Graphics/GraphicsEngineOpenGL/interface/BufferGL.h index 26c3b377..3ce855ec 100644 --- a/Graphics/GraphicsEngineOpenGL/interface/BufferGL.h +++ b/Graphics/GraphicsEngineOpenGL/interface/BufferGL.h @@ -42,11 +42,12 @@ static const INTERFACE_ID IID_BufferGL = {0x8df7319, 0xf425, 0x4ec7, {0x8d, 0x2b, 0x1b, 0x3f, 0xc0, 0xbd, 0xdb, 0xb4}}; /// Exposes OpenGL-specific functionality of a buffer object. -DILIGENT_INTERFACE(IBufferGL, IBuffer) +DILIGENT_BEGIN_INTERFACE(IBufferGL, IBuffer) { /// Returns OpenGL buffer handle VIRTUAL GLuint METHOD(GetGLBufferHandle)(THIS) PURE; }; +DILIGENT_END_INTERFACE #include "../../../Primitives/interface/UndefInterfaceHelperMacros.h" @@ -60,11 +61,6 @@ struct IBufferGLVtbl struct IBufferGLMethods BufferGL; }; -typedef struct IBufferGL -{ - struct IBufferGLVtbl* pVtbl; -} IBufferGL; - # define IBufferGL_GetGLBufferHandle(This) CALL_IFACE_METHOD(BufferGL, GetGLBufferHandle, This) #endif diff --git a/Graphics/GraphicsEngineOpenGL/interface/BufferViewGL.h b/Graphics/GraphicsEngineOpenGL/interface/BufferViewGL.h index 60e0e4c6..085f23b6 100644 --- a/Graphics/GraphicsEngineOpenGL/interface/BufferViewGL.h +++ b/Graphics/GraphicsEngineOpenGL/interface/BufferViewGL.h @@ -44,7 +44,8 @@ static const INTERFACE_ID IID_BufferViewGL = #if DILIGENT_CPP_INTERFACE /// Exposes OpenGL-specific functionality of a buffer view object. -DILIGENT_INTERFACE(IBufferViewGL, IBufferView){}; +DILIGENT_BEGIN_INTERFACE(IBufferViewGL, IBufferView){}; +DILIGENT_END_INTERFACE #endif diff --git a/Graphics/GraphicsEngineOpenGL/interface/DeviceContextGL.h b/Graphics/GraphicsEngineOpenGL/interface/DeviceContextGL.h index e47cb0ab..d11b4a74 100644 --- a/Graphics/GraphicsEngineOpenGL/interface/DeviceContextGL.h +++ b/Graphics/GraphicsEngineOpenGL/interface/DeviceContextGL.h @@ -46,7 +46,7 @@ static const INTERFACE_ID IID_DeviceContextGL = // clang-format off /// Exposes OpenGL-specific functionality of a device context. -DILIGENT_INTERFACE(IDeviceContextGL, IDeviceContext) +DILIGENT_BEGIN_INTERFACE(IDeviceContextGL, IDeviceContext) { /// Attaches to the active GL context in the thread. @@ -62,6 +62,7 @@ DILIGENT_INTERFACE(IDeviceContextGL, IDeviceContext) VIRTUAL void METHOD(SetSwapChain)(THIS_ struct ISwapChainGL* pSwapChain) PURE; }; +DILIGENT_END_INTERFACE #include "../../../Primitives/interface/UndefInterfaceHelperMacros.h" @@ -76,11 +77,6 @@ struct IDeviceContextGLVtbl struct IDeviceContextGLMethods DeviceContextGL; }; -typedef struct IDeviceContextGL -{ - struct IDeviceContextGLVtbl* pVtbl; -} IDeviceContextGL; - // clang-format off # define IDeviceContextGL_UpdateCurrentGLContext(This) CALL_IFACE_METHOD(DeviceContextGL, UpdateCurrentGLContext, This) diff --git a/Graphics/GraphicsEngineOpenGL/interface/EngineFactoryOpenGL.h b/Graphics/GraphicsEngineOpenGL/interface/EngineFactoryOpenGL.h index 60b9f4c8..ad92cb68 100644 --- a/Graphics/GraphicsEngineOpenGL/interface/EngineFactoryOpenGL.h +++ b/Graphics/GraphicsEngineOpenGL/interface/EngineFactoryOpenGL.h @@ -63,7 +63,7 @@ static const INTERFACE_ID IID_EngineFactoryOpenGL = // clang-format off -DILIGENT_INTERFACE(IEngineFactoryOpenGL, IEngineFactory) +DILIGENT_BEGIN_INTERFACE(IEngineFactoryOpenGL, IEngineFactory) { VIRTUAL void METHOD(CreateDeviceAndSwapChainGL)(THIS_ const EngineGLCreateInfo REF EngineCI, @@ -80,6 +80,7 @@ DILIGENT_INTERFACE(IEngineFactoryOpenGL, IEngineFactory) IRenderDevice** ppDevice, IDeviceContext** ppImmediateContext) PURE; }; +DILIGENT_END_INTERFACE #include "../../../Primitives/interface/UndefInterfaceHelperMacros.h" @@ -94,11 +95,6 @@ struct IEngineFactoryOpenGLVtbl struct IEngineFactoryOpenGLMethods EngineFactoryOpenGL; }; -typedef struct IEngineFactoryOpenGL -{ - struct IEngineFactoryOpenGLVtbl* pVtbl; -} IEngineFactoryOpenGL; - // clang-format off # define IEngineFactoryOpenGL_CreateDeviceAndSwapChainGL(This, ...) CALL_IFACE_METHOD(EngineFactoryOpenGL, CreateDeviceAndSwapChainGL, This, __VA_ARGS__) diff --git a/Graphics/GraphicsEngineOpenGL/interface/FenceGL.h b/Graphics/GraphicsEngineOpenGL/interface/FenceGL.h index c5a3faca..86f4c390 100644 --- a/Graphics/GraphicsEngineOpenGL/interface/FenceGL.h +++ b/Graphics/GraphicsEngineOpenGL/interface/FenceGL.h @@ -44,7 +44,8 @@ static const INTERFACE_ID IID_FenceGL = #if DILIGENT_CPP_INTERFACE /// Exposes OpenGL-specific functionality of a fence object. -DILIGENT_INTERFACE(IFenceGL, IFence){}; +DILIGENT_BEGIN_INTERFACE(IFenceGL, IFence){}; +DILIGENT_END_INTERFACE #endif diff --git a/Graphics/GraphicsEngineOpenGL/interface/PipelineStateGL.h b/Graphics/GraphicsEngineOpenGL/interface/PipelineStateGL.h index de47144f..64a5dc84 100644 --- a/Graphics/GraphicsEngineOpenGL/interface/PipelineStateGL.h +++ b/Graphics/GraphicsEngineOpenGL/interface/PipelineStateGL.h @@ -44,7 +44,8 @@ static const INTERFACE_ID IID_PipelineStateGL = #if DILIGENT_CPP_INTERFACE /// Exposes OpenGL-specific functionality of a pipeline state object. -DILIGENT_INTERFACE(IPipelineStateGL, IPipelineState){}; +DILIGENT_BEGIN_INTERFACE(IPipelineStateGL, IPipelineState){}; +DILIGENT_END_INTERFACE #endif diff --git a/Graphics/GraphicsEngineOpenGL/interface/QueryGL.h b/Graphics/GraphicsEngineOpenGL/interface/QueryGL.h index 27749494..2e1a0853 100644 --- a/Graphics/GraphicsEngineOpenGL/interface/QueryGL.h +++ b/Graphics/GraphicsEngineOpenGL/interface/QueryGL.h @@ -43,11 +43,12 @@ static const INTERFACE_ID IID_QueryGL = #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" /// Exposes OpenGL-specific functionality of a Query object. -DILIGENT_INTERFACE(IQueryGL, IQuery) +DILIGENT_BEGIN_INTERFACE(IQueryGL, IQuery) { /// Returns OpenGL handle of an internal query object. VIRTUAL GLuint METHOD(GetGlQueryHandle)(THIS) CONST PURE; }; +DILIGENT_END_INTERFACE #include "../../../Primitives/interface/UndefInterfaceHelperMacros.h" @@ -61,11 +62,6 @@ struct IQueryGLVtbl struct IQueryGLMethods QueryGL; }; -typedef struct IQueryGL -{ - struct IQueryGLVtbl* pVtbl; -} IQueryGL; - # define IQueryGL_GetGlQueryHandle(This) CALL_IFACE_METHOD(QueryGL, GetGlQueryHandle, This) #endif diff --git a/Graphics/GraphicsEngineOpenGL/interface/RenderDeviceGL.h b/Graphics/GraphicsEngineOpenGL/interface/RenderDeviceGL.h index db508a1b..3329b420 100644 --- a/Graphics/GraphicsEngineOpenGL/interface/RenderDeviceGL.h +++ b/Graphics/GraphicsEngineOpenGL/interface/RenderDeviceGL.h @@ -45,7 +45,7 @@ static const INTERFACE_ID IID_RenderDeviceGL = // clang-format off /// Exposes OpenGL-specific functionality of a render device. -DILIGENT_INTERFACE(IRenderDeviceGL, IRenderDevice) +DILIGENT_BEGIN_INTERFACE(IRenderDeviceGL, IRenderDevice) { /// Creates a texture from OpenGL handle @@ -104,7 +104,7 @@ DILIGENT_INTERFACE(IRenderDeviceGL, IRenderDevice) RESOURCE_STATE InitialState, ITexture** ppTexture) PURE; }; - +DILIGENT_END_INTERFACE #include "../../../Primitives/interface/UndefInterfaceHelperMacros.h" @@ -119,11 +119,6 @@ struct IRenderDeviceGLVtbl struct IRenderDeviceGLMethods RenderDeviceGL; }; -typedef struct IRenderDeviceGL -{ - struct IRenderDeviceGLVtbl* pVtbl; -} IRenderDeviceGL; - // clang-format off # define IRenderDeviceGL_CreateTextureFromGLHandle(This, ...)CALL_IFACE_METHOD(RenderDeviceGL, CreateTextureFromGLHandle, This, __VA_ARGS__) diff --git a/Graphics/GraphicsEngineOpenGL/interface/SamplerGL.h b/Graphics/GraphicsEngineOpenGL/interface/SamplerGL.h index ac7625d7..49cdc5c7 100644 --- a/Graphics/GraphicsEngineOpenGL/interface/SamplerGL.h +++ b/Graphics/GraphicsEngineOpenGL/interface/SamplerGL.h @@ -44,7 +44,8 @@ static const INTERFACE_ID IID_SamplerGL = #if DILIGENT_CPP_INTERFACE /// Exposes OpenGL-specific functionality of a sampler object. -DILIGENT_INTERFACE(ISamplerGL, ISampler){}; +DILIGENT_BEGIN_INTERFACE(ISamplerGL, ISampler){}; +DILIGENT_END_INTERFACE #endif diff --git a/Graphics/GraphicsEngineOpenGL/interface/ShaderGL.h b/Graphics/GraphicsEngineOpenGL/interface/ShaderGL.h index 2a92c31b..efca18ce 100644 --- a/Graphics/GraphicsEngineOpenGL/interface/ShaderGL.h +++ b/Graphics/GraphicsEngineOpenGL/interface/ShaderGL.h @@ -44,7 +44,8 @@ static const INTERFACE_ID IID_ShaderGL = #if DILIGENT_CPP_INTERFACE /// Exposes OpenGL-specific functionality of a shader object. -DILIGENT_INTERFACE(IShaderGL, IShader){}; +DILIGENT_BEGIN_INTERFACE(IShaderGL, IShader){}; +DILIGENT_END_INTERFACE #endif @@ -60,11 +61,6 @@ struct IShaderGLVtbl //struct IShaderGLMethods ShaderGL; }; -typedef struct IShaderGL -{ - struct IShaderGLVtbl* pVtbl; -} IShaderGL; - #endif DILIGENT_END_NAMESPACE // namespace Diligent diff --git a/Graphics/GraphicsEngineOpenGL/interface/ShaderResourceBindingGL.h b/Graphics/GraphicsEngineOpenGL/interface/ShaderResourceBindingGL.h index 821bef77..52042495 100644 --- a/Graphics/GraphicsEngineOpenGL/interface/ShaderResourceBindingGL.h +++ b/Graphics/GraphicsEngineOpenGL/interface/ShaderResourceBindingGL.h @@ -44,7 +44,8 @@ static const INTERFACE_ID IID_ShaderResourceBindingGL = #if DILIGENT_CPP_INTERFACE /// Exposes OpenGL-specific functionality of a shader resource binding object. -DILIGENT_INTERFACE(IShaderResourceBindingGL, IShaderResourceBinding){}; +DILIGENT_BEGIN_INTERFACE(IShaderResourceBindingGL, IShaderResourceBinding){}; +DILIGENT_END_INTERFACE #endif @@ -60,11 +61,6 @@ struct IShaderResourceBindingGLVtbl //struct IShaderResourceBindingGLMethods ShaderResourceBindingGL; }; -typedef struct IShaderResourceBindingGL -{ - struct IShaderResourceBindingGLVtbl* pVtbl; -} IShaderResourceBindingGL; - #endif diff --git a/Graphics/GraphicsEngineOpenGL/interface/SwapChainGL.h b/Graphics/GraphicsEngineOpenGL/interface/SwapChainGL.h index 88d8d29e..186d861a 100644 --- a/Graphics/GraphicsEngineOpenGL/interface/SwapChainGL.h +++ b/Graphics/GraphicsEngineOpenGL/interface/SwapChainGL.h @@ -42,11 +42,12 @@ static const INTERFACE_ID IID_SwapChainGL = #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" /// Exposes OpenGL-specific functionality of a swap chain. -DILIGENT_INTERFACE(ISwapChainGL, ISwapChain) +DILIGENT_BEGIN_INTERFACE(ISwapChainGL, ISwapChain) { /// Returns the default framebuffer handle VIRTUAL GLuint METHOD(GetDefaultFBO)(THIS) CONST PURE; }; +DILIGENT_END_INTERFACE #include "../../../Primitives/interface/UndefInterfaceHelperMacros.h" @@ -60,11 +61,6 @@ struct ISwapChainGLVtbl struct ISwapChainGLMethods SwapChainGL; }; -typedef struct ISwapChainGL -{ - struct ISwapChainGLVtbl* pVtbl; -} ISwapChainGL; - // clang-format off # define ISwapChainGL_GetDefaultFBO(This) CALL_IFACE_METHOD(SwapChainGL, GetDefaultFBO, This) diff --git a/Graphics/GraphicsEngineOpenGL/interface/TextureGL.h b/Graphics/GraphicsEngineOpenGL/interface/TextureGL.h index 7d8e9306..bc779970 100644 --- a/Graphics/GraphicsEngineOpenGL/interface/TextureGL.h +++ b/Graphics/GraphicsEngineOpenGL/interface/TextureGL.h @@ -42,7 +42,7 @@ static const INTERFACE_ID IID_TextureGL = #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" /// Exposes OpenGL-specific functionality of a texture object. -DILIGENT_INTERFACE(ITextureGL, ITexture) +DILIGENT_BEGIN_INTERFACE(ITextureGL, ITexture) { /// Returns OpenGL texture handle VIRTUAL GLuint METHOD(GetGLTextureHandle)(THIS) PURE; @@ -50,6 +50,7 @@ DILIGENT_INTERFACE(ITextureGL, ITexture) /// Returns bind target of the native OpenGL texture VIRTUAL GLenum METHOD(GetBindTarget)(THIS) CONST PURE; }; +DILIGENT_END_INTERFACE #include "../../../Primitives/interface/UndefInterfaceHelperMacros.h" @@ -63,11 +64,6 @@ struct ITextureGLVtbl struct ITextureGLMethods TextureGL; }; -typedef struct ITextureGL -{ - struct ITextureGLVtbl* pVtbl; -} ITextureGL; - // clang-format off # define ITextureGL_GetGLTextureHandle(This) CALL_IFACE_METHOD(TextureGL, GetGLTextureHandle, This) diff --git a/Graphics/GraphicsEngineOpenGL/interface/TextureViewGL.h b/Graphics/GraphicsEngineOpenGL/interface/TextureViewGL.h index b69c1d3e..7831571f 100644 --- a/Graphics/GraphicsEngineOpenGL/interface/TextureViewGL.h +++ b/Graphics/GraphicsEngineOpenGL/interface/TextureViewGL.h @@ -44,11 +44,12 @@ static const INTERFACE_ID IID_TextureViewGL = #if DILIGENT_CPP_INTERFACE /// Exposes OpenGL-specific functionality of a texture view object. -DILIGENT_INTERFACE(ITextureViewGL, ITextureView) // +DILIGENT_BEGIN_INTERFACE(ITextureViewGL, ITextureView) // { //const GLObjectWrappers::GLTextureObj& GetHandle(); //GLenum GetBindTarget(); }; +DILIGENT_END_INTERFACE #endif diff --git a/Graphics/GraphicsEngineVulkan/interface/BufferViewVk.h b/Graphics/GraphicsEngineVulkan/interface/BufferViewVk.h index e1f1aa66..aee3dd94 100644 --- a/Graphics/GraphicsEngineVulkan/interface/BufferViewVk.h +++ b/Graphics/GraphicsEngineVulkan/interface/BufferViewVk.h @@ -44,11 +44,12 @@ static const INTERFACE_ID IID_BufferViewVk = // clang-format off /// Exposes Vulkan-specific functionality of a buffer view object. -DILIGENT_INTERFACE(IBufferViewVk, IBufferView) +DILIGENT_BEGIN_INTERFACE(IBufferViewVk, IBufferView) { /// Returns Vulkan buffer view object. VIRTUAL VkBufferView METHOD(GetVkBufferView)(THIS) CONST PURE; }; +DILIGENT_END_INTERFACE #include "../../../Primitives/interface/UndefInterfaceHelperMacros.h" @@ -64,12 +65,6 @@ struct IBufferViewVkVtbl struct IBufferViewVkMethods BufferViewVk; }; -typedef struct IBufferViewVk -{ - struct IBufferViewVkVtbl* pVtbl; -} IBufferViewVk; - - // clang-format off # define IBufferViewVk_GetVkBufferView(This) CALL_IFACE_METHOD(BufferViewVk, GetVkBufferView, This) diff --git a/Graphics/GraphicsEngineVulkan/interface/BufferVk.h b/Graphics/GraphicsEngineVulkan/interface/BufferVk.h index 5e145f39..5e444cf1 100644 --- a/Graphics/GraphicsEngineVulkan/interface/BufferVk.h +++ b/Graphics/GraphicsEngineVulkan/interface/BufferVk.h @@ -44,7 +44,7 @@ static const INTERFACE_ID IID_BufferVk = // clang-format off /// Exposes Vulkan-specific functionality of a buffer object. -DILIGENT_INTERFACE(IBufferVk, IBuffer) +DILIGENT_BEGIN_INTERFACE(IBufferVk, IBuffer) { /// Returns a vulkan buffer handle VIRTUAL VkBuffer METHOD(GetVkBuffer)(THIS) CONST PURE; @@ -59,6 +59,7 @@ DILIGENT_INTERFACE(IBufferVk, IBuffer) /// returns Vulkan access flags corresponding to the state. If the state is unknown, returns 0. VIRTUAL VkAccessFlags METHOD(GetAccessFlags)(THIS) CONST PURE; }; +DILIGENT_END_INTERFACE #include "../../../Primitives/interface/UndefInterfaceHelperMacros.h" @@ -74,11 +75,6 @@ struct IBufferVkVtbl struct IBufferVkMethods BufferVk; }; -typedef struct IBufferVk -{ - struct IBufferVkVtbl* pVtbl; -} IBufferVk; - # define IBufferVk_GetVkBuffer(This) CALL_IFACE_METHOD(BufferVk, GetVkBuffer, This) # define IBufferVk_SetAccessFlags(This, ...) CALL_IFACE_METHOD(BufferVk, SetAccessFlags, This, __VA_ARGS__) # define IBufferVk_GetAccessFlags(This) CALL_IFACE_METHOD(BufferVk, GetAccessFlags, This) diff --git a/Graphics/GraphicsEngineVulkan/interface/CommandQueueVk.h b/Graphics/GraphicsEngineVulkan/interface/CommandQueueVk.h index 9742d474..9a93b1ae 100644 --- a/Graphics/GraphicsEngineVulkan/interface/CommandQueueVk.h +++ b/Graphics/GraphicsEngineVulkan/interface/CommandQueueVk.h @@ -44,7 +44,7 @@ static const INTERFACE_ID IID_CommandQueueVk = // clang-format off /// Command queue interface -DILIGENT_INTERFACE(ICommandQueueVk, IObject) +DILIGENT_BEGIN_INTERFACE(ICommandQueueVk, IObject) { /// Returns the fence value that will be signaled next time VIRTUAL Uint64 METHOD(GetNextFenceValue)(THIS) CONST PURE; @@ -83,6 +83,7 @@ DILIGENT_INTERFACE(ICommandQueueVk, IObject) VIRTUAL void METHOD(SignalFence)(THIS_ VkFence vkFence) PURE; }; +DILIGENT_END_INTERFACE #include "../../../Primitives/interface/UndefInterfaceHelperMacros.h" @@ -96,11 +97,6 @@ struct ICommandQueueVkVtbl struct ICommandQueueVkMethods CommandQueueVk; }; -typedef struct ICommandQueueVk -{ - struct ICommandQueueVkVtbl* pVtbl; -} ICommandQueueVk; - // clang-format off # define ICommandQueueVk_GetNextFenceValue(This) CALL_IFACE_METHOD(CommandQueueVk, GetNextFenceValue, This) diff --git a/Graphics/GraphicsEngineVulkan/interface/DeviceContextVk.h b/Graphics/GraphicsEngineVulkan/interface/DeviceContextVk.h index f6650410..bad568e4 100644 --- a/Graphics/GraphicsEngineVulkan/interface/DeviceContextVk.h +++ b/Graphics/GraphicsEngineVulkan/interface/DeviceContextVk.h @@ -45,7 +45,7 @@ static const INTERFACE_ID IID_DeviceContextVk = // clang-format off /// Exposes Vulkan-specific functionality of a device context. -DILIGENT_INTERFACE(IDeviceContextVk, IDeviceContext) +DILIGENT_BEGIN_INTERFACE(IDeviceContextVk, IDeviceContext) { /// Transitions internal vulkan image to a specified layout @@ -86,6 +86,7 @@ DILIGENT_INTERFACE(IDeviceContextVk, IDeviceContext) /// Unlocks the command queue that was previously locked by IDeviceContextVk::LockCommandQueue(). VIRTUAL void METHOD(UnlockCommandQueue)(THIS) PURE; }; +DILIGENT_END_INTERFACE #include "../../../Primitives/interface/UndefInterfaceHelperMacros.h" @@ -100,11 +101,6 @@ struct IDeviceContextVkVtbl struct IDeviceContextVkMethods DeviceContextVk; }; -typedef struct IDeviceContextVk -{ - struct IDeviceContextVkVtbl* pVtbl; -} IDeviceContextVk; - // clang-format off # define IDeviceContextVk_TransitionImageLayout(This, ...) CALL_IFACE_METHOD(DeviceContextVk, TransitionImageLayout, This, __VA_ARGS__) diff --git a/Graphics/GraphicsEngineVulkan/interface/EngineFactoryVk.h b/Graphics/GraphicsEngineVulkan/interface/EngineFactoryVk.h index a074c14a..f9c8ad39 100644 --- a/Graphics/GraphicsEngineVulkan/interface/EngineFactoryVk.h +++ b/Graphics/GraphicsEngineVulkan/interface/EngineFactoryVk.h @@ -60,7 +60,7 @@ static const INTERFACE_ID IID_EngineFactoryVk = // clang-format off -DILIGENT_INTERFACE(IEngineFactoryVk, IEngineFactory) +DILIGENT_BEGIN_INTERFACE(IEngineFactoryVk, IEngineFactory) { VIRTUAL void METHOD(CreateDeviceAndContextsVk)(THIS_ const EngineVkCreateInfo REF EngineCI, @@ -80,6 +80,7 @@ DILIGENT_INTERFACE(IEngineFactoryVk, IEngineFactory) void* pNativeWndHandle, ISwapChain** ppSwapChain) PURE; }; +DILIGENT_END_INTERFACE #include "../../../Primitives/interface/UndefInterfaceHelperMacros.h" @@ -94,11 +95,6 @@ struct IEngineFactoryVkVtbl struct IEngineFactoryVkMethods EngineFactoryVk; }; -typedef struct IEngineFactoryVk -{ - struct IEngineFactoryVkVtbl* pVtbl; -} IEngineFactoryVk; - // clang-format off # define IEngineFactoryVk_CreateDeviceAndContextsVk(This, ...) CALL_IFACE_METHOD(EngineFactoryVk, CreateDeviceAndContextsVk, This, __VA_ARGS__) diff --git a/Graphics/GraphicsEngineVulkan/interface/FenceVk.h b/Graphics/GraphicsEngineVulkan/interface/FenceVk.h index e5521dd6..ffa851b8 100644 --- a/Graphics/GraphicsEngineVulkan/interface/FenceVk.h +++ b/Graphics/GraphicsEngineVulkan/interface/FenceVk.h @@ -46,9 +46,10 @@ static const INTERFACE_ID IID_FenceVk = #if DILIGENT_CPP_INTERFACE /// Exposes Vulkan-specific functionality of a fence object. -DILIGENT_INTERFACE(IFenceVk, IFence) +DILIGENT_BEGIN_INTERFACE(IFenceVk, IFence) { }; +DILIGENT_END_INTERFACE #endif diff --git a/Graphics/GraphicsEngineVulkan/interface/PipelineStateVk.h b/Graphics/GraphicsEngineVulkan/interface/PipelineStateVk.h index 0102ddfb..453851a7 100644 --- a/Graphics/GraphicsEngineVulkan/interface/PipelineStateVk.h +++ b/Graphics/GraphicsEngineVulkan/interface/PipelineStateVk.h @@ -42,7 +42,7 @@ static const INTERFACE_ID IID_PipelineStateVk = #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" /// Exposes Vulkan-specific functionality of a pipeline state object. -DILIGENT_INTERFACE(IPipelineStateVk, IPipelineState) +DILIGENT_BEGIN_INTERFACE(IPipelineStateVk, IPipelineState) { /// Returns handle to a vulkan render pass object. VIRTUAL VkRenderPass METHOD(GetVkRenderPass)(THIS) CONST PURE; @@ -50,6 +50,7 @@ DILIGENT_INTERFACE(IPipelineStateVk, IPipelineState) /// Returns handle to a vulkan pipeline pass object. VIRTUAL VkPipeline METHOD(GetVkPipeline)(THIS) CONST PURE; }; +DILIGENT_END_INTERFACE #include "../../../Primitives/interface/UndefInterfaceHelperMacros.h" @@ -63,11 +64,6 @@ struct IPipelineStateVkVtbl struct IPipelineStateVkMethods PipelineStateVk; }; -typedef struct IPipelineStateVk -{ - struct IPipelineStateVkVtbl* pVtbl; -} IPipelineStateVk; - // clang-format off # define IPipelineStateVk_GetVkRenderPass(This) CALL_IFACE_METHOD(PipelineStateVk, GetVkRenderPass, This) diff --git a/Graphics/GraphicsEngineVulkan/interface/QueryVk.h b/Graphics/GraphicsEngineVulkan/interface/QueryVk.h index 77d18bad..a5179258 100644 --- a/Graphics/GraphicsEngineVulkan/interface/QueryVk.h +++ b/Graphics/GraphicsEngineVulkan/interface/QueryVk.h @@ -44,7 +44,8 @@ static const INTERFACE_ID IID_QueryVk = #if DILIGENT_CPP_INTERFACE /// Exposes Vulkan-specific functionality of a Query object. -DILIGENT_INTERFACE(IQueryVk, IQuery){}; +DILIGENT_BEGIN_INTERFACE(IQueryVk, IQuery){}; +DILIGENT_END_INTERFACE #endif diff --git a/Graphics/GraphicsEngineVulkan/interface/RenderDeviceVk.h b/Graphics/GraphicsEngineVulkan/interface/RenderDeviceVk.h index 270a5b4e..e0099db7 100644 --- a/Graphics/GraphicsEngineVulkan/interface/RenderDeviceVk.h +++ b/Graphics/GraphicsEngineVulkan/interface/RenderDeviceVk.h @@ -44,7 +44,7 @@ static const INTERFACE_ID IID_RenderDeviceVk = // clang-format off /// Exposes Vulkan-specific functionality of a render device. -DILIGENT_INTERFACE(IRenderDeviceVk, IRenderDevice) +DILIGENT_BEGIN_INTERFACE(IRenderDeviceVk, IRenderDevice) { /// Returns logical Vulkan device handle VIRTUAL VkDevice METHOD(GetVkDevice)(THIS) PURE; @@ -109,6 +109,7 @@ DILIGENT_INTERFACE(IRenderDeviceVk, IRenderDevice) RESOURCE_STATE InitialState, IBuffer** ppBuffer) PURE; }; +DILIGENT_END_INTERFACE #include "../../../Primitives/interface/UndefInterfaceHelperMacros.h" @@ -123,11 +124,6 @@ struct IRenderDeviceVkVtbl struct IRenderDeviceVkMethods RenderDeviceVk; }; -typedef struct IRenderDeviceVk -{ - struct IRenderDeviceVkVtbl* pVtbl; -} IRenderDeviceVk; - // clang-format off # define IRenderDeviceVk_GetVkDevice(This) CALL_IFACE_METHOD(RenderDeviceVk, GetVkDevice, This) diff --git a/Graphics/GraphicsEngineVulkan/interface/SamplerVk.h b/Graphics/GraphicsEngineVulkan/interface/SamplerVk.h index 38e034a9..a86e1a3e 100644 --- a/Graphics/GraphicsEngineVulkan/interface/SamplerVk.h +++ b/Graphics/GraphicsEngineVulkan/interface/SamplerVk.h @@ -42,11 +42,12 @@ static const INTERFACE_ID IID_SamplerVk = #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" /// Exposes Vulkan-specific functionality of a sampler object. -DILIGENT_INTERFACE(ISamplerVk, ISampler) +DILIGENT_BEGIN_INTERFACE(ISamplerVk, ISampler) { /// Returns a vulkan sampler object handle VIRTUAL VkSampler METHOD(GetVkSampler)() CONST PURE; }; +DILIGENT_END_INTERFACE #include "../../../Primitives/interface/UndefInterfaceHelperMacros.h" @@ -60,11 +61,6 @@ struct ISamplerVkVtbl struct ISamplerVkMethods SamplerVk; }; -typedef struct ISamplerVk -{ - struct ISamplerVkVtbl* pVtbl; -} ISamplerVk; - # define ISamplerVk_GetVkSampler(This) CALL_IFACE_METHOD(SamplerVk, GetVkSampler, This) #endif diff --git a/Graphics/GraphicsEngineVulkan/interface/ShaderResourceBindingVk.h b/Graphics/GraphicsEngineVulkan/interface/ShaderResourceBindingVk.h index ae7faf16..4c86b7ff 100644 --- a/Graphics/GraphicsEngineVulkan/interface/ShaderResourceBindingVk.h +++ b/Graphics/GraphicsEngineVulkan/interface/ShaderResourceBindingVk.h @@ -44,7 +44,8 @@ static const INTERFACE_ID IID_ShaderResourceBindingVk = #if DILIGENT_CPP_INTERFACE /// Exposes Vulkan-specific functionality of a shader resource binding object. -DILIGENT_INTERFACE(IShaderResourceBindingVk, IShaderResourceBinding){}; +DILIGENT_BEGIN_INTERFACE(IShaderResourceBindingVk, IShaderResourceBinding){}; +DILIGENT_END_INTERFACE #endif @@ -60,11 +61,6 @@ struct IShaderResourceBindingVkVtbl //struct IShaderResourceBindingVkMethods ShaderResourceBindingVk; }; -typedef struct IShaderResourceBindingVk -{ - struct IShaderResourceBindingVkVtbl* pVtbl; -} IShaderResourceBindingVk; - #endif DILIGENT_END_NAMESPACE // namespace Diligent diff --git a/Graphics/GraphicsEngineVulkan/interface/SwapChainVk.h b/Graphics/GraphicsEngineVulkan/interface/SwapChainVk.h index 033d5c5b..532ffbcf 100644 --- a/Graphics/GraphicsEngineVulkan/interface/SwapChainVk.h +++ b/Graphics/GraphicsEngineVulkan/interface/SwapChainVk.h @@ -45,11 +45,12 @@ static const INTERFACE_ID IID_SwapChainVk = #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" /// Exposes Vulkan-specific functionality of a swap chain. -DILIGENT_INTERFACE(ISwapChainVk, ISwapChain) +DILIGENT_BEGIN_INTERFACE(ISwapChainVk, ISwapChain) { /// Returns a handle to the Vulkan swap chain object. VIRTUAL VkSwapchainKHR METHOD(GetVkSwapChain)(THIS) PURE; }; +DILIGENT_END_INTERFACE #include "../../../Primitives/interface/UndefInterfaceHelperMacros.h" @@ -63,11 +64,6 @@ struct ISwapChainVkVtbl struct ISwapChainVkMethods SwapChainVk; }; -typedef struct ISwapChainVk -{ - struct ISwapChainVkVtbl* pVtbl; -} ISwapChainVk; - // clang-format off # define ISwapChainVk_GetVkSwapChain(This) CALL_IFACE_METHOD(SwapChainVk, GetVkSwapChain, This) diff --git a/Graphics/GraphicsEngineVulkan/interface/TextureViewVk.h b/Graphics/GraphicsEngineVulkan/interface/TextureViewVk.h index 968273e8..c6ee2438 100644 --- a/Graphics/GraphicsEngineVulkan/interface/TextureViewVk.h +++ b/Graphics/GraphicsEngineVulkan/interface/TextureViewVk.h @@ -44,11 +44,12 @@ static const INTERFACE_ID IID_TextureViewVk = // clang-format off /// Exposes Vulkan-specific functionality of a texture view object. -DILIGENT_INTERFACE(ITextureViewVk, ITextureView) +DILIGENT_BEGIN_INTERFACE(ITextureViewVk, ITextureView) { /// Returns Vulkan image view handle VIRTUAL VkImageView METHOD(GetVulkanImageView)(THIS) CONST PURE; }; +DILIGENT_END_INTERFACE #include "../../../Primitives/interface/UndefInterfaceHelperMacros.h" @@ -64,11 +65,6 @@ struct ITextureViewVkVtbl struct ITextureViewVkMethods TextureViewVk; }; -typedef struct ITextureViewVk -{ - struct ITextureViewVkVtbl* pVtbl; -} ITextureViewVk; - // clang-format off # define ITextureViewVk_GetVulkanImageView(This) CALL_IFACE_METHOD(TextureViewVk, GetVulkanImageView, This) diff --git a/Graphics/GraphicsEngineVulkan/interface/TextureVk.h b/Graphics/GraphicsEngineVulkan/interface/TextureVk.h index f8336f09..7dd96782 100644 --- a/Graphics/GraphicsEngineVulkan/interface/TextureVk.h +++ b/Graphics/GraphicsEngineVulkan/interface/TextureVk.h @@ -44,7 +44,7 @@ static const INTERFACE_ID IID_TextureVk = // clang-format off /// Exposes Vulkan-specific functionality of a texture object. -DILIGENT_INTERFACE(ITextureVk, ITexture) +DILIGENT_BEGIN_INTERFACE(ITextureVk, ITexture) { /// Returns Vulkan image handle. @@ -62,6 +62,7 @@ DILIGENT_INTERFACE(ITextureVk, ITexture) /// Returns current Vulkan image layout. If the state is unknown to the engine, returns VK_IMAGE_LAYOUT_UNDEFINED VIRTUAL VkImageLayout METHOD(GetLayout)(THIS) CONST PURE; }; +DILIGENT_END_INTERFACE #include "../../../Primitives/interface/UndefInterfaceHelperMacros.h" @@ -77,11 +78,6 @@ struct ITextureVkVtbl struct ITextureVkMethods TextureVk; }; -typedef struct ITextureVk -{ - struct ITextureVkVtbl* pVtbl; -} ITextureVk; - // clang-format off # define ITextureVk_GetVkImage(This) CALL_IFACE_METHOD(TextureVk, GetVkImage,This) diff --git a/Graphics/HLSL2GLSLConverterLib/interface/HLSL2GLSLConverter.h b/Graphics/HLSL2GLSLConverterLib/interface/HLSL2GLSLConverter.h index ba9b092f..74a93c11 100644 --- a/Graphics/HLSL2GLSLConverterLib/interface/HLSL2GLSLConverter.h +++ b/Graphics/HLSL2GLSLConverterLib/interface/HLSL2GLSLConverter.h @@ -45,7 +45,7 @@ static const INTERFACE_ID IID_HLSL2GLSLConversionStream = // clang-format off -DILIGENT_INTERFACE(IHLSL2GLSLConversionStream, IObject) +DILIGENT_BEGIN_INTERFACE(IHLSL2GLSLConversionStream, IObject) { VIRTUAL void METHOD(Convert)(THIS_ const Char* EntryPoint, @@ -55,6 +55,7 @@ DILIGENT_INTERFACE(IHLSL2GLSLConversionStream, IObject) bool UseInOutLocationQualifiers, IDataBlob** ppGLSLSource) PURE; }; +DILIGENT_END_INTERFACE #include "../../../Primitives/interface/UndefInterfaceHelperMacros.h" @@ -68,11 +69,6 @@ struct IHLSL2GLSLConversionStreamVtbl struct IHLSL2GLSLConversionStreamMethods HLSL2GLSLConversionStream; }; -typedef struct IHLSL2GLSLConversionStream -{ - struct IHLSL2GLSLConversionStreamVtbl* pVtbl; -} IHLSL2GLSLConversionStream; - // clang-format off # define IHLSL2GLSLConversionStream_Convert(This, ...) CALL_IFACE_METHOD(HLSL2GLSLConversionStream, Convert, This, __VA_ARGS__) @@ -86,13 +82,13 @@ typedef struct IHLSL2GLSLConversionStream static const INTERFACE_ID IID_HLSL2GLSLConverter = {0x44a21160, 0x77e0, 0x4ddc, {0xa5, 0x7e, 0xb8, 0xb8, 0xb6, 0x5b, 0x53, 0x42}}; -#define DILIGENT_INTERFACE_NAME IHLSL2GLSLConversionStream +#define DILIGENT_INTERFACE_NAME IHLSL2GLSLConverter #include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" // clang-format off /// Interface to the buffer object implemented in OpenGL -DILIGENT_INTERFACE(IHLSL2GLSLConverter, IObject) +DILIGENT_BEGIN_INTERFACE(IHLSL2GLSLConverter, IObject) { VIRTUAL void METHOD(CreateStream)(THIS_ const Char* InputFileName, @@ -101,6 +97,7 @@ DILIGENT_INTERFACE(IHLSL2GLSLConverter, IObject) size_t NumSymbols, IHLSL2GLSLConversionStream** ppStream) CONST PURE; }; +DILIGENT_END_INTERFACE #include "../../../Primitives/interface/UndefInterfaceHelperMacros.h" @@ -114,11 +111,6 @@ struct IHLSL2GLSLConverterVtbl struct IHLSL2GLSLConverterMethods HLSL2GLSLConverter; }; -typedef struct IHLSL2GLSLConverter -{ - struct IHLSL2GLSLConverterVtbl* pVtbl; -} IHLSL2GLSLConverter; - // clang-format off # define IHLSL2GLSLConverter_CreateStream(This, ...) CALL_IFACE_METHOD(HLSL2GLSLConverter, CreateStream, This, __VA_ARGS__) -- cgit v1.2.3