diff options
| author | assiduous <assiduous@diligentgraphics.com> | 2020-01-27 20:34:52 +0000 |
|---|---|---|
| committer | assiduous <assiduous@diligentgraphics.com> | 2020-01-27 20:34:52 +0000 |
| commit | 2a0f9a6b4c4e71a21711f794b864ecb0f27f300d (patch) | |
| tree | 8bb08842a4972f9dcbcf98d82ba85962435033a8 /Graphics | |
| parent | Guarded interface definitions by define-undef macro helper include pairs to a... (diff) | |
| download | DiligentCore-2a0f9a6b4c4e71a21711f794b864ecb0f27f300d.tar.gz DiligentCore-2a0f9a6b4c4e71a21711f794b864ecb0f27f300d.zip | |
Fixed class vs struct issues. Implemented HLSL2GLSL Convertor C interfaces
Diffstat (limited to 'Graphics')
27 files changed, 87 insertions, 70 deletions
diff --git a/Graphics/GraphicsEngine/include/BufferViewBase.hpp b/Graphics/GraphicsEngine/include/BufferViewBase.hpp index 13c4610b..313fcf21 100644 --- a/Graphics/GraphicsEngine/include/BufferViewBase.hpp +++ b/Graphics/GraphicsEngine/include/BufferViewBase.hpp @@ -38,9 +38,6 @@ namespace Diligent { -class IRenderDevice; -class IBuffer; - /// Template class implementing base functionality for a buffer view object /// \tparam BaseInterface - base interface that this class will inheret diff --git a/Graphics/GraphicsEngine/include/FenceBase.hpp b/Graphics/GraphicsEngine/include/FenceBase.hpp index 97e9904c..e6a21bbf 100644 --- a/Graphics/GraphicsEngine/include/FenceBase.hpp +++ b/Graphics/GraphicsEngine/include/FenceBase.hpp @@ -37,9 +37,6 @@ namespace Diligent { -class IRenderDevice; -class IFence; - /// Template class implementing base functionality for a Fence object /// \tparam BaseInterface - base interface that this class will inheret diff --git a/Graphics/GraphicsEngine/include/QueryBase.hpp b/Graphics/GraphicsEngine/include/QueryBase.hpp index 701b7d2b..cf6061f3 100644 --- a/Graphics/GraphicsEngine/include/QueryBase.hpp +++ b/Graphics/GraphicsEngine/include/QueryBase.hpp @@ -38,8 +38,6 @@ namespace Diligent { -class IDeviceContext; - /// Template class implementing base functionality for a Query object /// \tparam BaseInterface - base interface that this class will inheret diff --git a/Graphics/GraphicsEngine/include/TextureViewBase.hpp b/Graphics/GraphicsEngine/include/TextureViewBase.hpp index e9bf3c75..905c9201 100644 --- a/Graphics/GraphicsEngine/include/TextureViewBase.hpp +++ b/Graphics/GraphicsEngine/include/TextureViewBase.hpp @@ -63,7 +63,7 @@ public: TextureViewBase(IReferenceCounters* pRefCounters, RenderDeviceImplType* pDevice, const TextureViewDesc& ViewDesc, - class ITexture* pTexture, + ITexture* pTexture, bool bIsDefaultView) : // Default views are created as part of the texture, so we cannot not keep strong // reference to the texture to avoid cyclic links. Instead, we will attach to the @@ -77,7 +77,7 @@ public: IMPLEMENT_QUERY_INTERFACE_IN_PLACE(IID_TextureView, TDeviceObjectBase) /// Implementation of ITextureView::SetSampler() - virtual void SetSampler(class ISampler* pSampler) override final + virtual void SetSampler(ISampler* pSampler) override final { #ifdef DEVELOPMENT if (this->m_Desc.ViewType != TEXTURE_VIEW_SHADER_RESOURCE) diff --git a/Graphics/GraphicsEngineD3D11/include/BufferViewD3D11Impl.hpp b/Graphics/GraphicsEngineD3D11/include/BufferViewD3D11Impl.hpp index a0067e3c..0b0ab051 100644 --- a/Graphics/GraphicsEngineD3D11/include/BufferViewD3D11Impl.hpp +++ b/Graphics/GraphicsEngineD3D11/include/BufferViewD3D11Impl.hpp @@ -49,7 +49,7 @@ public: BufferViewD3D11Impl(IReferenceCounters* pRefCounters, RenderDeviceD3D11Impl* pDevice, const BufferViewDesc& ViewDesc, - class IBuffer* pBuffer, + IBuffer* pBuffer, ID3D11View* pD3D11View, bool bIsDefaultView); diff --git a/Graphics/GraphicsEngineD3D11/include/ShaderResourceCacheD3D11.hpp b/Graphics/GraphicsEngineD3D11/include/ShaderResourceCacheD3D11.hpp index ef18f9f0..4c7e2c69 100644 --- a/Graphics/GraphicsEngineD3D11/include/ShaderResourceCacheD3D11.hpp +++ b/Graphics/GraphicsEngineD3D11/include/ShaderResourceCacheD3D11.hpp @@ -30,6 +30,7 @@ /// \file /// Declaration of Diligent::ShaderResourceCacheD3D11 class +#include "MemoryAllocator.h" #include "TextureBaseD3D11.hpp" #include "BufferD3D11Impl.hpp" #include "SamplerD3D11Impl.hpp" @@ -126,9 +127,9 @@ public: static size_t GetRequriedMemorySize(const class ShaderResourcesD3D11& Resources); - void Initialize(const class ShaderResourcesD3D11& Resources, class IMemoryAllocator& MemAllocator); - void Initialize(Uint32 CBCount, Uint32 SRVCount, Uint32 SamplerCount, Uint32 UAVCount, class IMemoryAllocator& MemAllocator); - void Destroy(class IMemoryAllocator& MemAllocator); + void Initialize(const class ShaderResourcesD3D11& Resources, IMemoryAllocator& MemAllocator); + void Initialize(Uint32 CBCount, Uint32 SRVCount, Uint32 SamplerCount, Uint32 UAVCount, IMemoryAllocator& MemAllocator); + void Destroy(IMemoryAllocator& MemAllocator); __forceinline void SetCB(Uint32 Slot, RefCntAutoPtr<BufferD3D11Impl>&& pBuffD3D11Impl) diff --git a/Graphics/GraphicsEngineD3D11/include/ShaderResourceLayoutD3D11.hpp b/Graphics/GraphicsEngineD3D11/include/ShaderResourceLayoutD3D11.hpp index 16de0e28..a5534f3f 100644 --- a/Graphics/GraphicsEngineD3D11/include/ShaderResourceLayoutD3D11.hpp +++ b/Graphics/GraphicsEngineD3D11/include/ShaderResourceLayoutD3D11.hpp @@ -41,8 +41,6 @@ namespace Diligent { -class IMemoryAllocator; - /// Diligent::ShaderResourceLayoutD3D11 class /// http://diligentgraphics.com/diligent-engine/architecture/d3d11/shader-resource-layout/ // sizeof(ShaderResourceLayoutD3D11) == 64 (x64) diff --git a/Graphics/GraphicsEngineD3D11/include/SwapChainD3D11Impl.hpp b/Graphics/GraphicsEngineD3D11/include/SwapChainD3D11Impl.hpp index f40b4b9b..34c372fc 100644 --- a/Graphics/GraphicsEngineD3D11/include/SwapChainD3D11Impl.hpp +++ b/Graphics/GraphicsEngineD3D11/include/SwapChainD3D11Impl.hpp @@ -36,8 +36,6 @@ namespace Diligent { -class IMemoryAllocator; - /// Swap chain implementation in Direct3D11 backend. class SwapChainD3D11Impl final : public SwapChainD3DBase<ISwapChainD3D11, IDXGISwapChain> { diff --git a/Graphics/GraphicsEngineD3D11/include/TextureViewD3D11Impl.hpp b/Graphics/GraphicsEngineD3D11/include/TextureViewD3D11Impl.hpp index 20c2afbf..dffbb87f 100644 --- a/Graphics/GraphicsEngineD3D11/include/TextureViewD3D11Impl.hpp +++ b/Graphics/GraphicsEngineD3D11/include/TextureViewD3D11Impl.hpp @@ -49,7 +49,7 @@ public: TextureViewD3D11Impl(IReferenceCounters* pRefCounters, RenderDeviceD3D11Impl* pDevice, const TextureViewDesc& ViewDesc, - class ITexture* pTexture, + ITexture* pTexture, ID3D11View* pD3D11View, bool bIsDefaultView); diff --git a/Graphics/GraphicsEngineD3D12/include/BufferViewD3D12Impl.hpp b/Graphics/GraphicsEngineD3D12/include/BufferViewD3D12Impl.hpp index 62cb6294..e88ba682 100644 --- a/Graphics/GraphicsEngineD3D12/include/BufferViewD3D12Impl.hpp +++ b/Graphics/GraphicsEngineD3D12/include/BufferViewD3D12Impl.hpp @@ -50,7 +50,7 @@ public: BufferViewD3D12Impl(IReferenceCounters* pRefCounters, RenderDeviceD3D12Impl* pDevice, const BufferViewDesc& ViewDesc, - class IBuffer* pBuffer, + IBuffer* pBuffer, DescriptorHeapAllocation&& HandleAlloc, bool bIsDefaultView); diff --git a/Graphics/GraphicsEngineD3D12/include/SwapChainD3D12Impl.hpp b/Graphics/GraphicsEngineD3D12/include/SwapChainD3D12Impl.hpp index 0c45d915..30c6577e 100644 --- a/Graphics/GraphicsEngineD3D12/include/SwapChainD3D12Impl.hpp +++ b/Graphics/GraphicsEngineD3D12/include/SwapChainD3D12Impl.hpp @@ -37,9 +37,6 @@ namespace Diligent { -class ITextureViewD3D12; -class IMemoryAllocator; - /// Swap chain implementation in Direct3D12 backend. class SwapChainD3D12Impl final : public SwapChainD3DBase<ISwapChainD3D12, IDXGISwapChain3> { diff --git a/Graphics/GraphicsEngineD3D12/include/TextureViewD3D12Impl.hpp b/Graphics/GraphicsEngineD3D12/include/TextureViewD3D12Impl.hpp index 2c2529ae..fe69179b 100644 --- a/Graphics/GraphicsEngineD3D12/include/TextureViewD3D12Impl.hpp +++ b/Graphics/GraphicsEngineD3D12/include/TextureViewD3D12Impl.hpp @@ -50,7 +50,7 @@ public: TextureViewD3D12Impl(IReferenceCounters* pRefCounters, RenderDeviceD3D12Impl* pDevice, const TextureViewDesc& ViewDesc, - class ITexture* pTexture, + ITexture* pTexture, DescriptorHeapAllocation&& Descriptor, DescriptorHeapAllocation&& TexArraySRVDescriptor, DescriptorHeapAllocation&& MipLevelUAVDescriptors, diff --git a/Graphics/GraphicsEngineD3D12/interface/BufferD3D12.h b/Graphics/GraphicsEngineD3D12/interface/BufferD3D12.h index 399d078c..12e3175b 100644 --- a/Graphics/GraphicsEngineD3D12/interface/BufferD3D12.h +++ b/Graphics/GraphicsEngineD3D12/interface/BufferD3D12.h @@ -31,12 +31,11 @@ /// Definition of the Diligent::IBufferD3D12 interface #include "../../GraphicsEngine/interface/Buffer.h" +#include "../../GraphicsEngine/interface/DeviceContext.h" namespace Diligent { -class IDeviceContext; - // {3E9B15ED-A289-48DC-8214-C6E3E6177378} static constexpr INTERFACE_ID IID_BufferD3D12 = {0x3e9b15ed, 0xa289, 0x48dc, {0x82, 0x14, 0xc6, 0xe3, 0xe6, 0x17, 0x73, 0x78}}; diff --git a/Graphics/GraphicsEngineOpenGL/include/BufferGLImpl.hpp b/Graphics/GraphicsEngineOpenGL/include/BufferGLImpl.hpp index 72142592..a5a033c8 100644 --- a/Graphics/GraphicsEngineOpenGL/include/BufferGLImpl.hpp +++ b/Graphics/GraphicsEngineOpenGL/include/BufferGLImpl.hpp @@ -85,7 +85,7 @@ public: virtual void* GetNativeHandle() override final { return reinterpret_cast<void*>(static_cast<size_t>(GetGLBufferHandle())); } private: - virtual void CreateViewInternal(const struct BufferViewDesc& ViewDesc, class IBufferView** ppView, bool bIsDefaultView) override; + virtual void CreateViewInternal(const struct BufferViewDesc& ViewDesc, IBufferView** ppView, bool bIsDefaultView) override; friend class DeviceContextGLImpl; friend class VAOCache; diff --git a/Graphics/GraphicsEngineOpenGL/include/BufferViewGLImpl.hpp b/Graphics/GraphicsEngineOpenGL/include/BufferViewGLImpl.hpp index 5cefada0..6c92168e 100644 --- a/Graphics/GraphicsEngineOpenGL/include/BufferViewGLImpl.hpp +++ b/Graphics/GraphicsEngineOpenGL/include/BufferViewGLImpl.hpp @@ -37,12 +37,6 @@ namespace Diligent { -class FixedBlockMemoryAllocator; -class IRenderDevice; -class IDeviceContext; -class BufferGLImpl; -struct BufferViewDesc; - /// Buffer view implementation in OpenGL backend. class BufferViewGLImpl final : public BufferViewBase<IBufferViewGL, RenderDeviceGLImpl> { diff --git a/Graphics/GraphicsEngineOpenGL/include/GLPipelineResourceLayout.hpp b/Graphics/GraphicsEngineOpenGL/include/GLPipelineResourceLayout.hpp index d97db39f..bcaee216 100644 --- a/Graphics/GraphicsEngineOpenGL/include/GLPipelineResourceLayout.hpp +++ b/Graphics/GraphicsEngineOpenGL/include/GLPipelineResourceLayout.hpp @@ -77,8 +77,6 @@ namespace Diligent { -class IMemoryAllocator; - class GLPipelineResourceLayout { public: diff --git a/Graphics/GraphicsEngineOpenGL/include/GLProgramResourceCache.hpp b/Graphics/GraphicsEngineOpenGL/include/GLProgramResourceCache.hpp index 0a0bdd5a..cb2cce48 100644 --- a/Graphics/GraphicsEngineOpenGL/include/GLProgramResourceCache.hpp +++ b/Graphics/GraphicsEngineOpenGL/include/GLProgramResourceCache.hpp @@ -115,8 +115,8 @@ public: static size_t GetRequriedMemorySize(Uint32 UBCount, Uint32 SamplerCount, Uint32 ImageCount, Uint32 SSBOCount); - void Initialize(Uint32 UBCount, Uint32 SamplerCount, Uint32 ImageCount, Uint32 SSBOCount, class IMemoryAllocator& MemAllocator); - void Destroy(class IMemoryAllocator& MemAllocator); + void Initialize(Uint32 UBCount, Uint32 SamplerCount, Uint32 ImageCount, Uint32 SSBOCount, IMemoryAllocator& MemAllocator); + void Destroy(IMemoryAllocator& MemAllocator); void SetUniformBuffer(Uint32 Binding, RefCntAutoPtr<BufferGLImpl>&& pBuff) { diff --git a/Graphics/GraphicsEngineOpenGL/include/SwapChainGLBase.hpp b/Graphics/GraphicsEngineOpenGL/include/SwapChainGLBase.hpp index 4d18927b..2eeb500e 100644 --- a/Graphics/GraphicsEngineOpenGL/include/SwapChainGLBase.hpp +++ b/Graphics/GraphicsEngineOpenGL/include/SwapChainGLBase.hpp @@ -33,8 +33,6 @@ namespace Diligent { -class IMemoryAllocator; - /// Base implementation of a swap chain for OpenGL. template <class BaseInterface> class SwapChainGLBase : public SwapChainBase<BaseInterface> diff --git a/Graphics/GraphicsEngineOpenGL/include/SwapChainGLImpl.hpp b/Graphics/GraphicsEngineOpenGL/include/SwapChainGLImpl.hpp index fb069301..b3613007 100644 --- a/Graphics/GraphicsEngineOpenGL/include/SwapChainGLImpl.hpp +++ b/Graphics/GraphicsEngineOpenGL/include/SwapChainGLImpl.hpp @@ -34,8 +34,6 @@ namespace Diligent { -class IMemoryAllocator; - /// Swap chain implementation in OpenGL backend. class SwapChainGLImpl final : public SwapChainGLBase<ISwapChainGL> { diff --git a/Graphics/GraphicsEngineOpenGL/include/TextureBaseGL.hpp b/Graphics/GraphicsEngineOpenGL/include/TextureBaseGL.hpp index 306ddb64..3ec4a128 100644 --- a/Graphics/GraphicsEngineOpenGL/include/TextureBaseGL.hpp +++ b/Graphics/GraphicsEngineOpenGL/include/TextureBaseGL.hpp @@ -123,7 +123,7 @@ public: protected: virtual void CreateViewInternal(const struct TextureViewDesc& ViewDesc, - class ITextureView** ppView, + ITextureView** ppView, bool bIsDefaultView) override; void SetDefaultGLParameters(); diff --git a/Graphics/GraphicsEngineOpenGL/src/BufferGLImpl.cpp b/Graphics/GraphicsEngineOpenGL/src/BufferGLImpl.cpp index bce00b60..e3fff3ee 100644 --- a/Graphics/GraphicsEngineOpenGL/src/BufferGLImpl.cpp +++ b/Graphics/GraphicsEngineOpenGL/src/BufferGLImpl.cpp @@ -365,7 +365,7 @@ void BufferGLImpl::BufferMemoryBarrier(Uint32 RequiredBarriers, GLContextState& #endif } -void BufferGLImpl::CreateViewInternal(const BufferViewDesc& OrigViewDesc, class IBufferView** ppView, bool bIsDefaultView) +void BufferGLImpl::CreateViewInternal(const BufferViewDesc& OrigViewDesc, IBufferView** ppView, bool bIsDefaultView) { VERIFY(ppView != nullptr, "Buffer view pointer address is null"); if (!ppView) return; diff --git a/Graphics/GraphicsEngineOpenGL/src/GLProgramResourceCache.cpp b/Graphics/GraphicsEngineOpenGL/src/GLProgramResourceCache.cpp index a23abd3e..5981ce86 100644 --- a/Graphics/GraphicsEngineOpenGL/src/GLProgramResourceCache.cpp +++ b/Graphics/GraphicsEngineOpenGL/src/GLProgramResourceCache.cpp @@ -43,7 +43,7 @@ size_t GLProgramResourceCache::GetRequriedMemorySize(Uint32 UBCount, Uint32 Samp return MemSize; } -void GLProgramResourceCache::Initialize(Uint32 UBCount, Uint32 SamplerCount, Uint32 ImageCount, Uint32 SSBOCount, class IMemoryAllocator& MemAllocator) +void GLProgramResourceCache::Initialize(Uint32 UBCount, Uint32 SamplerCount, Uint32 ImageCount, Uint32 SSBOCount, IMemoryAllocator& MemAllocator) { // clang-format off m_SmplrsOffset = static_cast<Uint16>(m_UBsOffset + sizeof(CachedUB) * UBCount); @@ -90,7 +90,7 @@ GLProgramResourceCache::~GLProgramResourceCache() VERIFY(!IsInitialized(), "Shader resource cache memory must be released with GLProgramResourceCache::Destroy()"); } -void GLProgramResourceCache::Destroy(class IMemoryAllocator& MemAllocator) +void GLProgramResourceCache::Destroy(IMemoryAllocator& MemAllocator) { VERIFY(IsInitialized(), "Resource cache is not initialized"); VERIFY(m_pdbgMemoryAllocator == &MemAllocator, "The allocator does not match the one used to create resources"); diff --git a/Graphics/GraphicsEngineOpenGL/src/TextureBaseGL.cpp b/Graphics/GraphicsEngineOpenGL/src/TextureBaseGL.cpp index 72733d70..19119423 100644 --- a/Graphics/GraphicsEngineOpenGL/src/TextureBaseGL.cpp +++ b/Graphics/GraphicsEngineOpenGL/src/TextureBaseGL.cpp @@ -283,7 +283,7 @@ TextureBaseGL::~TextureBaseGL() IMPLEMENT_QUERY_INTERFACE(TextureBaseGL, IID_TextureGL, TTextureBase) -void TextureBaseGL::CreateViewInternal(const struct TextureViewDesc& OrigViewDesc, class ITextureView** ppView, bool bIsDefaultView) +void TextureBaseGL::CreateViewInternal(const struct TextureViewDesc& OrigViewDesc, ITextureView** ppView, bool bIsDefaultView) { VERIFY(ppView != nullptr, "Null pointer provided"); if (!ppView) return; diff --git a/Graphics/GraphicsEngineVulkan/include/BufferViewVkImpl.hpp b/Graphics/GraphicsEngineVulkan/include/BufferViewVkImpl.hpp index e6a18966..7dfd2917 100644 --- a/Graphics/GraphicsEngineVulkan/include/BufferViewVkImpl.hpp +++ b/Graphics/GraphicsEngineVulkan/include/BufferViewVkImpl.hpp @@ -51,7 +51,7 @@ public: BufferViewVkImpl(IReferenceCounters* pRefCounters, RenderDeviceVkImpl* pDevice, const BufferViewDesc& ViewDesc, - class IBuffer* pBuffer, + IBuffer* pBuffer, VulkanUtilities::BufferViewWrapper&& BuffView, bool bIsDefaultView); ~BufferViewVkImpl(); diff --git a/Graphics/GraphicsEngineVulkan/include/SwapChainVkImpl.hpp b/Graphics/GraphicsEngineVulkan/include/SwapChainVkImpl.hpp index 961343f2..89a20137 100644 --- a/Graphics/GraphicsEngineVulkan/include/SwapChainVkImpl.hpp +++ b/Graphics/GraphicsEngineVulkan/include/SwapChainVkImpl.hpp @@ -39,9 +39,6 @@ namespace Diligent { -class ITextureViewVk; -class IMemoryAllocator; - /// Swap chain implementation in Vulkan backend. class SwapChainVkImpl final : public SwapChainBase<ISwapChainVk> { diff --git a/Graphics/GraphicsEngineVulkan/include/TextureViewVkImpl.hpp b/Graphics/GraphicsEngineVulkan/include/TextureViewVkImpl.hpp index 5731512f..e4ebf33b 100644 --- a/Graphics/GraphicsEngineVulkan/include/TextureViewVkImpl.hpp +++ b/Graphics/GraphicsEngineVulkan/include/TextureViewVkImpl.hpp @@ -50,7 +50,7 @@ public: TextureViewVkImpl(IReferenceCounters* pRefCounters, RenderDeviceVkImpl* pDevice, const TextureViewDesc& ViewDesc, - class ITexture* pTexture, + ITexture* pTexture, VulkanUtilities::ImageViewWrapper&& ImgView, bool bIsDefaultView); ~TextureViewVkImpl(); diff --git a/Graphics/HLSL2GLSLConverterLib/interface/HLSL2GLSLConverter.h b/Graphics/HLSL2GLSLConverterLib/interface/HLSL2GLSLConverter.h index 3633e356..38180185 100644 --- a/Graphics/HLSL2GLSLConverterLib/interface/HLSL2GLSLConverter.h +++ b/Graphics/HLSL2GLSLConverterLib/interface/HLSL2GLSLConverter.h @@ -39,20 +39,45 @@ DILIGENT_BEGIN_NAMESPACE(Diligent) static constexpr INTERFACE_ID IID_HLSL2GLSLConversionStream = {0x1fde020a, 0x9c73, 0x4a76, {0x8a, 0xef, 0xc2, 0xc6, 0xc2, 0xcf, 0xe, 0xa5}}; -#if DILIGENT_CPP_INTERFACE -class IHLSL2GLSLConversionStream : public IObject +#define DILIGENT_INTERFACE_NAME IHLSL2GLSLConversionStream +#include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" + +// clang-format off + +DILIGENT_INTERFACE(IHLSL2GLSLConversionStream, IObject) { -public: - virtual void Convert(const Char* EntryPoint, - SHADER_TYPE ShaderType, - bool IncludeDefintions, - const char* SamplerSuffix, - bool UseInOutLocationQualifiers, - IDataBlob** ppGLSLSource) = 0; + VIRTUAL void METHOD(Convert)(THIS_ + const Char* EntryPoint, + SHADER_TYPE ShaderType, + bool IncludeDefintions, + const char* SamplerSuffix, + bool UseInOutLocationQualifiers, + IDataBlob** ppGLSLSource) PURE; }; -#else +#include "../../../Primitives/interface/UndefInterfaceHelperMacros.h" + +#if DILIGENT_C_INTERFACE + +// clang-format on + +struct IHLSL2GLSLConversionStreamVtbl +{ + struct IObjectMethods Object; + struct IHLSL2GLSLConversionStreamMethods HLSL2GLSLConversionStream; +}; + +typedef struct IHLSL2GLSLConversionStream +{ + struct IHLSL2GLSLConversionStreamVtbl* pVtbl; +} IHLSL2GLSLConversionStream; + +// clang-format off + +# define IHLSL2GLSLConversionStream_Convert(This) (This)->pVtbl->HLSL2GLSLConversionStream.Convert((IHLSL2GLSLConversionStream*)(This), __VA_ARGS__) + +// clang-format on #endif @@ -61,20 +86,42 @@ public: static constexpr INTERFACE_ID IID_HLSL2GLSLConverter = {0x44a21160, 0x77e0, 0x4ddc, {0xa5, 0x7e, 0xb8, 0xb8, 0xb6, 0x5b, 0x53, 0x42}}; -#if DILIGENT_CPP_INTERFACE +#define DILIGENT_INTERFACE_NAME IHLSL2GLSLConversionStream +#include "../../../Primitives/interface/DefineInterfaceHelperMacros.h" + +// clang-format off /// Interface to the buffer object implemented in OpenGL -class IHLSL2GLSLConverter : public IObject +DILIGENT_INTERFACE(IHLSL2GLSLConverter, IObject) { -public: - virtual void CreateStream(const Char* InputFileName, - IShaderSourceInputStreamFactory* pSourceStreamFactory, - const Char* HLSLSource, - size_t NumSymbols, - IHLSL2GLSLConversionStream** ppStream) const = 0; + VIRTUAL void METHOD(CreateStream)(THIS_ + const Char* InputFileName, + IShaderSourceInputStreamFactory* pSourceStreamFactory, + const Char* HLSLSource, + size_t NumSymbols, + IHLSL2GLSLConversionStream** ppStream) CONST PURE; }; -#else +#if DILIGENT_C_INTERFACE + +// clang-format on + +struct IHLSL2GLSLConverterVtbl +{ + struct IObjectMethods Object; + struct IHLSL2GLSLConverterMethods HLSL2GLSLConverter; +}; + +typedef struct IHLSL2GLSLConverter +{ + struct IHLSL2GLSLConverterVtbl* pVtbl; +} IHLSL2GLSLConverter; + +// clang-format off + +# define IHLSL2GLSLConverter_CreateStream(This) (This)->pVtbl->HLSL2GLSLConverter.CreateStream((IHLSL2GLSLConverter*)(This), __VA_ARGS__) + +// clang-format on #endif |
