diff options
| author | assiduous <assiduous@diligentgraphics.com> | 2021-03-04 20:46:21 +0000 |
|---|---|---|
| committer | assiduous <assiduous@diligentgraphics.com> | 2021-03-19 00:38:15 +0000 |
| commit | 4f5a4499cf0eee3761788eb6a422cd25e02ace40 (patch) | |
| tree | a4caf790bcb35483de2eaa56b7735230a0f1b7a5 /Graphics/GraphicsEngineOpenGL | |
| parent | Minor updates to ValidatePipelineResourceSignatureDesc (diff) | |
| download | DiligentCore-4f5a4499cf0eee3761788eb6a422cd25e02ace40.tar.gz DiligentCore-4f5a4499cf0eee3761788eb6a422cd25e02ace40.zip | |
Refactored passing template arguments to base classes
Diffstat (limited to 'Graphics/GraphicsEngineOpenGL')
18 files changed, 149 insertions, 101 deletions
diff --git a/Graphics/GraphicsEngineOpenGL/CMakeLists.txt b/Graphics/GraphicsEngineOpenGL/CMakeLists.txt index 6890b22d..d2853156 100644 --- a/Graphics/GraphicsEngineOpenGL/CMakeLists.txt +++ b/Graphics/GraphicsEngineOpenGL/CMakeLists.txt @@ -7,6 +7,7 @@ set(INCLUDE include/BufferGLImpl.hpp include/BufferViewGLImpl.hpp include/DeviceContextGLImpl.hpp + include/EngineGLImplTraits.hpp include/FBOCache.hpp include/FenceGLImpl.hpp include/FramebufferGLImpl.hpp diff --git a/Graphics/GraphicsEngineOpenGL/include/BufferGLImpl.hpp b/Graphics/GraphicsEngineOpenGL/include/BufferGLImpl.hpp index ba10834e..9fd8be2f 100644 --- a/Graphics/GraphicsEngineOpenGL/include/BufferGLImpl.hpp +++ b/Graphics/GraphicsEngineOpenGL/include/BufferGLImpl.hpp @@ -39,13 +39,11 @@ namespace Diligent { -class FixedBlockMemoryAllocator; - /// Buffer object implementation in OpenGL backend. -class BufferGLImpl final : public BufferBase<IBufferGL, RenderDeviceGLImpl, BufferViewGLImpl, FixedBlockMemoryAllocator>, public AsyncWritableResource +class BufferGLImpl final : public BufferBase<EngineGLImplTraits>, public AsyncWritableResource { public: - using TBufferBase = BufferBase<IBufferGL, RenderDeviceGLImpl, BufferViewGLImpl, FixedBlockMemoryAllocator>; + using TBufferBase = BufferBase<EngineGLImplTraits>; BufferGLImpl(IReferenceCounters* pRefCounters, FixedBlockMemoryAllocator& BuffViewObjMemAllocator, diff --git a/Graphics/GraphicsEngineOpenGL/include/BufferViewGLImpl.hpp b/Graphics/GraphicsEngineOpenGL/include/BufferViewGLImpl.hpp index 73d654a9..a61e7e6d 100644 --- a/Graphics/GraphicsEngineOpenGL/include/BufferViewGLImpl.hpp +++ b/Graphics/GraphicsEngineOpenGL/include/BufferViewGLImpl.hpp @@ -37,10 +37,10 @@ namespace Diligent { /// Buffer view implementation in OpenGL backend. -class BufferViewGLImpl final : public BufferViewBase<IBufferViewGL, RenderDeviceGLImpl> +class BufferViewGLImpl final : public BufferViewBase<EngineGLImplTraits> { public: - using TBuffViewBase = BufferViewBase<IBufferViewGL, RenderDeviceGLImpl>; + using TBuffViewBase = BufferViewBase<EngineGLImplTraits>; BufferViewGLImpl(IReferenceCounters* pRefCounters, RenderDeviceGLImpl* pDevice, diff --git a/Graphics/GraphicsEngineOpenGL/include/DeviceContextGLImpl.hpp b/Graphics/GraphicsEngineOpenGL/include/DeviceContextGLImpl.hpp index dc27008f..9926204f 100644 --- a/Graphics/GraphicsEngineOpenGL/include/DeviceContextGLImpl.hpp +++ b/Graphics/GraphicsEngineOpenGL/include/DeviceContextGLImpl.hpp @@ -47,24 +47,11 @@ namespace Diligent { -struct DeviceContextGLImplTraits -{ - using BufferType = BufferGLImpl; - using TextureType = TextureBaseGL; - using PipelineStateType = PipelineStateGLImpl; - using DeviceType = RenderDeviceGLImpl; - using QueryType = QueryGLImpl; - using FramebufferType = FramebufferGLImpl; - using RenderPassType = RenderPassGLImpl; - using BottomLevelASType = BottomLevelASBase<IBottomLevelAS, RenderDeviceGLImpl>; - using TopLevelASType = TopLevelASBase<ITopLevelAS, BottomLevelASType, RenderDeviceGLImpl>; -}; - /// Device context implementation in OpenGL backend. -class DeviceContextGLImpl final : public DeviceContextBase<IDeviceContextGL, DeviceContextGLImplTraits> +class DeviceContextGLImpl final : public DeviceContextBase<EngineGLImplTraits> { public: - using TDeviceContextBase = DeviceContextBase<IDeviceContextGL, DeviceContextGLImplTraits>; + using TDeviceContextBase = DeviceContextBase<EngineGLImplTraits>; DeviceContextGLImpl(IReferenceCounters* pRefCounters, RenderDeviceGLImpl* pDeviceGL, bool bIsDeferred); diff --git a/Graphics/GraphicsEngineOpenGL/include/EngineGLImplTraits.hpp b/Graphics/GraphicsEngineOpenGL/include/EngineGLImplTraits.hpp new file mode 100644 index 00000000..077c11ce --- /dev/null +++ b/Graphics/GraphicsEngineOpenGL/include/EngineGLImplTraits.hpp @@ -0,0 +1,115 @@ +/* + * Copyright 2019-2021 Diligent Graphics LLC + * Copyright 2015-2019 Egor Yusov + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * In no event and under no legal theory, whether in tort (including negligence), + * contract, or otherwise, unless required by applicable law (such as deliberate + * and grossly negligent acts) or agreed to in writing, shall any Contributor be + * liable for any damages, including any direct, indirect, special, incidental, + * or consequential damages of any character arising as a result of this License or + * out of the use or inability to use the software (including but not limited to damages + * for loss of goodwill, work stoppage, computer failure or malfunction, or any and + * all other commercial damages or losses), even if such Contributor has been advised + * of the possibility of such damages. + */ + +#pragma once + +/// \file +/// Declaration of Diligent::EngineGLImplTraits struct + +#include "RenderDeviceGL.h" +#include "PipelineStateGL.h" +#include "ShaderResourceBindingGL.h" +#include "BufferGL.h" +#include "BufferViewGL.h" +#include "TextureGL.h" +#include "TextureViewGL.h" +#include "ShaderGL.h" +#include "SamplerGL.h" +#include "FenceGL.h" +#include "QueryGL.h" +#include "RenderPass.h" +#include "Framebuffer.h" +#include "PipelineResourceSignature.h" +#include "DeviceContextGL.h" +#include "BaseInterfacesGL.h" + +namespace Diligent +{ + +class RenderDeviceGLImpl; +class DeviceContextGLImpl; +class PipelineStateGLImpl; +class ShaderResourceBindingGLImpl; +class BufferGLImpl; +class BufferViewGLImpl; +class TextureBaseGL; +class TextureViewGLImpl; +class ShaderGLImpl; +class SamplerGLImpl; +class FenceGLImpl; +class QueryGLImpl; +class RenderPassGLImpl; +class FramebufferGLImpl; +class BottomLevelASGLImpl; +class TopLevelASGLImpl; +class ShaderBindingTableGLImpl; +class PipelineResourceSignatureGLImpl; + +class FixedBlockMemoryAllocator; + +struct EngineGLImplTraits +{ + using RenderDeviceInterface = IGLDeviceBaseInterface; + using DeviceContextInterface = IDeviceContextGL; + using PipelineStateInterface = IPipelineStateGL; + using ShaderResourceBindingInterface = IShaderResourceBindingGL; + using BufferInterface = IBufferGL; + using BufferViewInterface = IBufferViewGL; + using TextureInterface = ITextureGL; + using TextureViewInterface = ITextureViewGL; + using ShaderInterface = IShaderGL; + using SamplerInterface = ISamplerGL; + using FenceInterface = IFenceGL; + using QueryInterface = IQueryGL; + using RenderPassInterface = IRenderPass; + using FramebufferInterface = IFramebuffer; + using PipelineResourceSignatureInterface = IPipelineResourceSignature; + + using RenderDeviceImplType = RenderDeviceGLImpl; + using DeviceContextImplType = DeviceContextGLImpl; + using PipelineStateImplType = PipelineStateGLImpl; + using ShaderResourceBindingImplType = ShaderResourceBindingGLImpl; + using BufferImplType = BufferGLImpl; + using BufferViewImplType = BufferViewGLImpl; + using TextureImplType = TextureBaseGL; + using TextureViewImplType = TextureViewGLImpl; + using ShaderImplType = ShaderGLImpl; + using SamplerImplType = SamplerGLImpl; + using FenceImplType = FenceGLImpl; + using QueryImplType = QueryGLImpl; + using RenderPassImplType = RenderPassGLImpl; + using FramebufferImplType = FramebufferGLImpl; + using BottomLevelASImplType = BottomLevelASGLImpl; + using TopLevelASImplType = TopLevelASGLImpl; + using ShaderBindingTableImplType = ShaderBindingTableGLImpl; + using PipelineResourceSignatureImplType = PipelineResourceSignatureGLImpl; + + using BuffViewObjAllocatorType = FixedBlockMemoryAllocator; + using TexViewObjAllocatorType = FixedBlockMemoryAllocator; +}; + +} // namespace Diligent diff --git a/Graphics/GraphicsEngineOpenGL/include/FenceGLImpl.hpp b/Graphics/GraphicsEngineOpenGL/include/FenceGLImpl.hpp index ba99aa71..108a676d 100644 --- a/Graphics/GraphicsEngineOpenGL/include/FenceGLImpl.hpp +++ b/Graphics/GraphicsEngineOpenGL/include/FenceGLImpl.hpp @@ -40,13 +40,11 @@ namespace Diligent { -class FixedBlockMemoryAllocator; - /// Fence object implementation in OpenGL backend. -class FenceGLImpl final : public FenceBase<IFenceGL, RenderDeviceGLImpl> +class FenceGLImpl final : public FenceBase<EngineGLImplTraits> { public: - using TFenceBase = FenceBase<IFenceGL, RenderDeviceGLImpl>; + using TFenceBase = FenceBase<EngineGLImplTraits>; FenceGLImpl(IReferenceCounters* pRefCounters, RenderDeviceGLImpl* pDevice, diff --git a/Graphics/GraphicsEngineOpenGL/include/FramebufferGLImpl.hpp b/Graphics/GraphicsEngineOpenGL/include/FramebufferGLImpl.hpp index f7e604e2..67ddc685 100644 --- a/Graphics/GraphicsEngineOpenGL/include/FramebufferGLImpl.hpp +++ b/Graphics/GraphicsEngineOpenGL/include/FramebufferGLImpl.hpp @@ -40,13 +40,11 @@ namespace Diligent { -class FixedBlockMemoryAllocator; - /// Framebuffer implementation in OpenGL backend. -class FramebufferGLImpl final : public FramebufferBase<IFramebuffer, RenderDeviceGLImpl> +class FramebufferGLImpl final : public FramebufferBase<EngineGLImplTraits> { public: - using TFramebufferBase = FramebufferBase<IFramebuffer, RenderDeviceGLImpl>; + using TFramebufferBase = FramebufferBase<EngineGLImplTraits>; FramebufferGLImpl(IReferenceCounters* pRefCounters, RenderDeviceGLImpl* pDevice, diff --git a/Graphics/GraphicsEngineOpenGL/include/PipelineResourceSignatureGLImpl.hpp b/Graphics/GraphicsEngineOpenGL/include/PipelineResourceSignatureGLImpl.hpp index 5c5d7c53..1966c12d 100644 --- a/Graphics/GraphicsEngineOpenGL/include/PipelineResourceSignatureGLImpl.hpp +++ b/Graphics/GraphicsEngineOpenGL/include/PipelineResourceSignatureGLImpl.hpp @@ -57,10 +57,10 @@ const char* GetBindingRangeName(BINDING_RANGE Range); /// Implementation of the Diligent::PipelineResourceSignatureGLImpl class -class PipelineResourceSignatureGLImpl final : public PipelineResourceSignatureBase<IPipelineResourceSignature, RenderDeviceGLImpl> +class PipelineResourceSignatureGLImpl final : public PipelineResourceSignatureBase<EngineGLImplTraits> { public: - using TPipelineResourceSignatureBase = PipelineResourceSignatureBase<IPipelineResourceSignature, RenderDeviceGLImpl>; + using TPipelineResourceSignatureBase = PipelineResourceSignatureBase<EngineGLImplTraits>; PipelineResourceSignatureGLImpl(IReferenceCounters* pRefCounters, RenderDeviceGLImpl* pDevice, diff --git a/Graphics/GraphicsEngineOpenGL/include/PipelineStateGLImpl.hpp b/Graphics/GraphicsEngineOpenGL/include/PipelineStateGLImpl.hpp index 476a742b..2ba8fd21 100644 --- a/Graphics/GraphicsEngineOpenGL/include/PipelineStateGLImpl.hpp +++ b/Graphics/GraphicsEngineOpenGL/include/PipelineStateGLImpl.hpp @@ -41,13 +41,11 @@ namespace Diligent { -class FixedBlockMemoryAllocator; - /// Pipeline state object implementation in OpenGL backend. -class PipelineStateGLImpl final : public PipelineStateBase<IPipelineStateGL, RenderDeviceGLImpl> +class PipelineStateGLImpl final : public PipelineStateBase<EngineGLImplTraits> { public: - using TPipelineStateBase = PipelineStateBase<IPipelineStateGL, RenderDeviceGLImpl>; + using TPipelineStateBase = PipelineStateBase<EngineGLImplTraits>; PipelineStateGLImpl(IReferenceCounters* pRefCounters, RenderDeviceGLImpl* pDeviceGL, diff --git a/Graphics/GraphicsEngineOpenGL/include/QueryGLImpl.hpp b/Graphics/GraphicsEngineOpenGL/include/QueryGLImpl.hpp index 8b69862b..b5a95fad 100644 --- a/Graphics/GraphicsEngineOpenGL/include/QueryGLImpl.hpp +++ b/Graphics/GraphicsEngineOpenGL/include/QueryGLImpl.hpp @@ -39,13 +39,11 @@ namespace Diligent { -class FixedBlockMemoryAllocator; - /// Query object implementation in OpenGL backend. -class QueryGLImpl final : public QueryBase<IQueryGL, RenderDeviceGLImpl> +class QueryGLImpl final : public QueryBase<EngineGLImplTraits> { public: - using TQueryBase = QueryBase<IQueryGL, RenderDeviceGLImpl>; + using TQueryBase = QueryBase<EngineGLImplTraits>; QueryGLImpl(IReferenceCounters* pRefCounters, RenderDeviceGLImpl* pDevice, diff --git a/Graphics/GraphicsEngineOpenGL/include/RenderDeviceGLImpl.hpp b/Graphics/GraphicsEngineOpenGL/include/RenderDeviceGLImpl.hpp index 5342ed3e..a0821579 100644 --- a/Graphics/GraphicsEngineOpenGL/include/RenderDeviceGLImpl.hpp +++ b/Graphics/GraphicsEngineOpenGL/include/RenderDeviceGLImpl.hpp @@ -28,6 +28,8 @@ #pragma once #include <memory> + +#include "EngineGLImplTraits.hpp" #include "RenderDeviceBase.hpp" #include "GLContext.hpp" #include "VAOCache.hpp" @@ -38,54 +40,12 @@ namespace Diligent { - -class RenderDeviceGLImpl; -class PipelineStateGLImpl; -class ShaderResourceBindingGLImpl; -class BufferGLImpl; -class BufferViewGLImpl; -class TextureBaseGL; -class TextureViewGLImpl; -class ShaderGLImpl; -class SamplerGLImpl; -class FenceGLImpl; -class QueryGLImpl; -class RenderPassGLImpl; -class FramebufferGLImpl; -class BottomLevelASGLImpl; -class TopLevelASGLImpl; -class ShaderBindingTableGLImpl; -class PipelineResourceSignatureGLImpl; - -struct RenderDeviceGLImplTraits -{ - using BaseInterface = IGLDeviceBaseInterface; - - using RenderDeviceImplType = RenderDeviceGLImpl; - using PipelineStateImplType = PipelineStateGLImpl; - using ShaderResourceBindingImplType = ShaderResourceBindingGLImpl; - using BufferImplType = BufferGLImpl; - using BufferViewImplType = BufferViewGLImpl; - using TextureImplType = TextureBaseGL; - using TextureViewImplType = TextureViewGLImpl; - using ShaderImplType = ShaderGLImpl; - using SamplerImplType = SamplerGLImpl; - using FenceImplType = FenceGLImpl; - using QueryImplType = QueryGLImpl; - using RenderPassImplType = RenderPassGLImpl; - using FramebufferImplType = FramebufferGLImpl; - using BottomLevelASImplType = BottomLevelASGLImpl; - using TopLevelASImplType = TopLevelASGLImpl; - using ShaderBindingTableImplType = ShaderBindingTableGLImpl; - using PipelineResourceSignatureImplType = PipelineResourceSignatureGLImpl; -}; - /// Render device implementation in OpenGL backend. // RenderDeviceGLESImpl is inherited from RenderDeviceGLImpl -class RenderDeviceGLImpl : public RenderDeviceBase<RenderDeviceGLImplTraits> +class RenderDeviceGLImpl : public RenderDeviceBase<EngineGLImplTraits> { public: - using TRenderDeviceBase = RenderDeviceBase<RenderDeviceGLImplTraits>; + using TRenderDeviceBase = RenderDeviceBase<EngineGLImplTraits>; RenderDeviceGLImpl(IReferenceCounters* pRefCounters, IMemoryAllocator& RawMemAllocator, diff --git a/Graphics/GraphicsEngineOpenGL/include/RenderPassGLImpl.hpp b/Graphics/GraphicsEngineOpenGL/include/RenderPassGLImpl.hpp index 0dc5f98d..f307ae15 100644 --- a/Graphics/GraphicsEngineOpenGL/include/RenderPassGLImpl.hpp +++ b/Graphics/GraphicsEngineOpenGL/include/RenderPassGLImpl.hpp @@ -40,10 +40,10 @@ namespace Diligent class FixedBlockMemoryAllocator; /// Render pass implementation in Direct3D11 backend. -class RenderPassGLImpl final : public RenderPassBase<IRenderPass, RenderDeviceGLImpl> +class RenderPassGLImpl final : public RenderPassBase<EngineGLImplTraits> { public: - using TRenderPassBase = RenderPassBase<IRenderPass, RenderDeviceGLImpl>; + using TRenderPassBase = RenderPassBase<EngineGLImplTraits>; RenderPassGLImpl(IReferenceCounters* pRefCounters, RenderDeviceGLImpl* pDevice, diff --git a/Graphics/GraphicsEngineOpenGL/include/SamplerGLImpl.hpp b/Graphics/GraphicsEngineOpenGL/include/SamplerGLImpl.hpp index 81705735..3dcc95e7 100644 --- a/Graphics/GraphicsEngineOpenGL/include/SamplerGLImpl.hpp +++ b/Graphics/GraphicsEngineOpenGL/include/SamplerGLImpl.hpp @@ -37,13 +37,11 @@ namespace Diligent { -class FixedBlockMemoryAllocator; - /// Sampler implementation in OpenGL backend. -class SamplerGLImpl final : public SamplerBase<ISamplerGL, RenderDeviceGLImpl> +class SamplerGLImpl final : public SamplerBase<EngineGLImplTraits> { public: - using TSamplerBase = SamplerBase<ISamplerGL, RenderDeviceGLImpl>; + using TSamplerBase = SamplerBase<EngineGLImplTraits>; SamplerGLImpl(IReferenceCounters* pRefCounters, RenderDeviceGLImpl* pDeviceGL, const SamplerDesc& SamplerDesc, bool bIsDeviceInternal = false); ~SamplerGLImpl(); diff --git a/Graphics/GraphicsEngineOpenGL/include/ShaderGLImpl.hpp b/Graphics/GraphicsEngineOpenGL/include/ShaderGLImpl.hpp index b958d59d..31c4686b 100644 --- a/Graphics/GraphicsEngineOpenGL/include/ShaderGLImpl.hpp +++ b/Graphics/GraphicsEngineOpenGL/include/ShaderGLImpl.hpp @@ -38,8 +38,6 @@ namespace Diligent { -class FixedBlockMemoryAllocator; - inline GLenum GetGLShaderType(SHADER_TYPE ShaderType) { switch (ShaderType) @@ -73,10 +71,10 @@ inline GLenum ShaderTypeToGLShaderBit(SHADER_TYPE ShaderType) } /// Shader object implementation in OpenGL backend. -class ShaderGLImpl final : public ShaderBase<IShaderGL, RenderDeviceGLImpl> +class ShaderGLImpl final : public ShaderBase<EngineGLImplTraits> { public: - using TShaderBase = ShaderBase<IShaderGL, RenderDeviceGLImpl>; + using TShaderBase = ShaderBase<EngineGLImplTraits>; ShaderGLImpl(IReferenceCounters* pRefCounters, RenderDeviceGLImpl* pDeviceGL, diff --git a/Graphics/GraphicsEngineOpenGL/include/ShaderResourceBindingGLImpl.hpp b/Graphics/GraphicsEngineOpenGL/include/ShaderResourceBindingGLImpl.hpp index 08efc5fe..5c585383 100644 --- a/Graphics/GraphicsEngineOpenGL/include/ShaderResourceBindingGLImpl.hpp +++ b/Graphics/GraphicsEngineOpenGL/include/ShaderResourceBindingGLImpl.hpp @@ -42,10 +42,10 @@ namespace Diligent { /// Shader resource binding object implementation in OpenGL backend. -class ShaderResourceBindingGLImpl final : public ShaderResourceBindingBase<IShaderResourceBindingGL, PipelineResourceSignatureGLImpl> +class ShaderResourceBindingGLImpl final : public ShaderResourceBindingBase<EngineGLImplTraits> { public: - using TBase = ShaderResourceBindingBase<IShaderResourceBindingGL, PipelineResourceSignatureGLImpl>; + using TBase = ShaderResourceBindingBase<EngineGLImplTraits>; ShaderResourceBindingGLImpl(IReferenceCounters* pRefCounters, PipelineResourceSignatureGLImpl* pPRS); diff --git a/Graphics/GraphicsEngineOpenGL/include/TextureBaseGL.hpp b/Graphics/GraphicsEngineOpenGL/include/TextureBaseGL.hpp index 6b507c67..2d4101ea 100644 --- a/Graphics/GraphicsEngineOpenGL/include/TextureBaseGL.hpp +++ b/Graphics/GraphicsEngineOpenGL/include/TextureBaseGL.hpp @@ -39,13 +39,11 @@ namespace Diligent { -class FixedBlockMemoryAllocator; - /// Base implementation of a texture object in OpenGL backend. -class TextureBaseGL : public TextureBase<ITextureGL, RenderDeviceGLImpl, TextureViewGLImpl, FixedBlockMemoryAllocator>, public AsyncWritableResource +class TextureBaseGL : public TextureBase<EngineGLImplTraits>, public AsyncWritableResource { public: - using TTextureBase = TextureBase<ITextureGL, RenderDeviceGLImpl, TextureViewGLImpl, FixedBlockMemoryAllocator>; + using TTextureBase = TextureBase<EngineGLImplTraits>; using ViewImplType = TextureViewGLImpl; TextureBaseGL(IReferenceCounters* pRefCounters, diff --git a/Graphics/GraphicsEngineOpenGL/include/TextureViewGLImpl.hpp b/Graphics/GraphicsEngineOpenGL/include/TextureViewGLImpl.hpp index 47e110a5..ae50f76c 100644 --- a/Graphics/GraphicsEngineOpenGL/include/TextureViewGLImpl.hpp +++ b/Graphics/GraphicsEngineOpenGL/include/TextureViewGLImpl.hpp @@ -40,10 +40,10 @@ namespace Diligent class FixedBlockMemoryAllocator; /// Texture view implementation in OpenGL backend. -class TextureViewGLImpl final : public TextureViewBase<ITextureViewGL, RenderDeviceGLImpl> +class TextureViewGLImpl final : public TextureViewBase<EngineGLImplTraits> { public: - using TTextureViewBase = TextureViewBase<ITextureViewGL, RenderDeviceGLImpl>; + using TTextureViewBase = TextureViewBase<EngineGLImplTraits>; TextureViewGLImpl(IReferenceCounters* pRefCounters, RenderDeviceGLImpl* pDevice, diff --git a/Graphics/GraphicsEngineOpenGL/src/ShaderVariableGL.cpp b/Graphics/GraphicsEngineOpenGL/src/ShaderVariableGL.cpp index aa36a7aa..be2312de 100644 --- a/Graphics/GraphicsEngineOpenGL/src/ShaderVariableGL.cpp +++ b/Graphics/GraphicsEngineOpenGL/src/ShaderVariableGL.cpp @@ -223,6 +223,7 @@ void ShaderVariableManagerGL::DestroyVariables(IMemoryAllocator& Allocator) ssbo.~StorageBufferBindInfo(); }); + Allocator.Free(m_ResourceBuffer); m_ResourceBuffer = nullptr; } |
