From 696a3cbb5a5f30d2f5000c0db90125d614ea09ca Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Sat, 6 Apr 2019 08:49:17 -0700 Subject: Made IShaderSourceInputStreamFactory derived from IObject (upgraded API Version to 240021) --- .../include/RenderDeviceGLESImpl.h | 1 + .../include/RenderDeviceGLImpl.h | 1 + .../src/EngineFactoryOpenGL.cpp | 4 ++-- .../src/RenderDeviceGLESImpl.cpp | 3 ++- .../src/RenderDeviceGLImpl.cpp | 23 +++++++++++++--------- 5 files changed, 20 insertions(+), 12 deletions(-) (limited to 'Graphics/GraphicsEngineOpenGL') diff --git a/Graphics/GraphicsEngineOpenGL/include/RenderDeviceGLESImpl.h b/Graphics/GraphicsEngineOpenGL/include/RenderDeviceGLESImpl.h index 57a966f2..c8e23561 100644 --- a/Graphics/GraphicsEngineOpenGL/include/RenderDeviceGLESImpl.h +++ b/Graphics/GraphicsEngineOpenGL/include/RenderDeviceGLESImpl.h @@ -33,6 +33,7 @@ class RenderDeviceGLESImpl final : public RenderDeviceGLImpl public: RenderDeviceGLESImpl( IReferenceCounters* pRefCounters, IMemoryAllocator& RawMemAllocator, + IEngineFactory* pEngineFactory, const EngineGLCreateInfo& InitAttribs, const SwapChainDesc* pSCDesc = nullptr); diff --git a/Graphics/GraphicsEngineOpenGL/include/RenderDeviceGLImpl.h b/Graphics/GraphicsEngineOpenGL/include/RenderDeviceGLImpl.h index cb278aa8..ce3aaee5 100644 --- a/Graphics/GraphicsEngineOpenGL/include/RenderDeviceGLImpl.h +++ b/Graphics/GraphicsEngineOpenGL/include/RenderDeviceGLImpl.h @@ -56,6 +56,7 @@ public: RenderDeviceGLImpl(IReferenceCounters* pRefCounters, IMemoryAllocator& RawMemAllocator, + IEngineFactory* pEngineFactory, const EngineGLCreateInfo& InitAttribs, const SwapChainDesc* pSCDesc = nullptr); ~RenderDeviceGLImpl(); diff --git a/Graphics/GraphicsEngineOpenGL/src/EngineFactoryOpenGL.cpp b/Graphics/GraphicsEngineOpenGL/src/EngineFactoryOpenGL.cpp index c44021d6..1e0c470f 100644 --- a/Graphics/GraphicsEngineOpenGL/src/EngineFactoryOpenGL.cpp +++ b/Graphics/GraphicsEngineOpenGL/src/EngineFactoryOpenGL.cpp @@ -126,7 +126,7 @@ void EngineFactoryOpenGLImpl::CreateDeviceAndSwapChainGL(const EngineGLCreateInf SetRawAllocator(EngineCI.pRawMemAllocator); auto &RawMemAllocator = GetRawAllocator(); - RenderDeviceGLImpl *pRenderDeviceOpenGL( NEW_RC_OBJ(RawMemAllocator, "TRenderDeviceGLImpl instance", TRenderDeviceGLImpl)(RawMemAllocator, EngineCI, &SCDesc) ); + RenderDeviceGLImpl *pRenderDeviceOpenGL( NEW_RC_OBJ(RawMemAllocator, "TRenderDeviceGLImpl instance", TRenderDeviceGLImpl)(RawMemAllocator, this, EngineCI, &SCDesc) ); pRenderDeviceOpenGL->QueryInterface(IID_RenderDevice, reinterpret_cast(ppDevice) ); DeviceContextGLImpl* pDeviceContextOpenGL( NEW_RC_OBJ(RawMemAllocator, "DeviceContextGLImpl instance", DeviceContextGLImpl)(pRenderDeviceOpenGL, false ) ); @@ -199,7 +199,7 @@ void EngineFactoryOpenGLImpl::AttachToActiveGLContext(const EngineGLCreateInfo& SetRawAllocator(EngineCI.pRawMemAllocator); auto &RawMemAllocator = GetRawAllocator(); - RenderDeviceGLImpl *pRenderDeviceOpenGL( NEW_RC_OBJ(RawMemAllocator, "TRenderDeviceGLImpl instance", TRenderDeviceGLImpl)(RawMemAllocator, EngineCI) ); + RenderDeviceGLImpl *pRenderDeviceOpenGL( NEW_RC_OBJ(RawMemAllocator, "TRenderDeviceGLImpl instance", TRenderDeviceGLImpl)(RawMemAllocator, this, EngineCI) ); pRenderDeviceOpenGL->QueryInterface(IID_RenderDevice, reinterpret_cast(ppDevice) ); DeviceContextGLImpl* pDeviceContextOpenGL( NEW_RC_OBJ(RawMemAllocator, "DeviceContextGLImpl instance", DeviceContextGLImpl)(pRenderDeviceOpenGL, false ) ); diff --git a/Graphics/GraphicsEngineOpenGL/src/RenderDeviceGLESImpl.cpp b/Graphics/GraphicsEngineOpenGL/src/RenderDeviceGLESImpl.cpp index 8edc0fcf..3ee32be7 100644 --- a/Graphics/GraphicsEngineOpenGL/src/RenderDeviceGLESImpl.cpp +++ b/Graphics/GraphicsEngineOpenGL/src/RenderDeviceGLESImpl.cpp @@ -29,9 +29,10 @@ namespace Diligent { RenderDeviceGLESImpl::RenderDeviceGLESImpl(IReferenceCounters* pRefCounters, IMemoryAllocator& RawMemAllocator, + IEngineFactory* pEngineFactory, const EngineGLCreateInfo& InitAttribs, const SwapChainDesc* pSCDesc) : - RenderDeviceGLImpl(pRefCounters, RawMemAllocator, InitAttribs, pSCDesc) + RenderDeviceGLImpl(pRefCounters, RawMemAllocator, pEngineFactory, InitAttribs, pSCDesc) { } diff --git a/Graphics/GraphicsEngineOpenGL/src/RenderDeviceGLImpl.cpp b/Graphics/GraphicsEngineOpenGL/src/RenderDeviceGLImpl.cpp index 6e5ba17c..4951be30 100644 --- a/Graphics/GraphicsEngineOpenGL/src/RenderDeviceGLImpl.cpp +++ b/Graphics/GraphicsEngineOpenGL/src/RenderDeviceGLImpl.cpp @@ -49,22 +49,27 @@ namespace Diligent RenderDeviceGLImpl :: RenderDeviceGLImpl(IReferenceCounters* pRefCounters, IMemoryAllocator& RawMemAllocator, + IEngineFactory* pEngineFactory, const EngineGLCreateInfo& InitAttribs, const SwapChainDesc* pSCDesc): TRenderDeviceBase { pRefCounters, RawMemAllocator, + pEngineFactory, 0, - sizeof(TextureBaseGL), - sizeof(TextureViewGLImpl), - sizeof(BufferGLImpl), - sizeof(BufferViewGLImpl), - sizeof(ShaderGLImpl), - sizeof(SamplerGLImpl), - sizeof(PipelineStateGLImpl), - sizeof(ShaderResourceBindingGLImpl), - sizeof(FenceGLImpl) + DeviceObjectSizes + { + sizeof(TextureBaseGL), + sizeof(TextureViewGLImpl), + sizeof(BufferGLImpl), + sizeof(BufferViewGLImpl), + sizeof(ShaderGLImpl), + sizeof(SamplerGLImpl), + sizeof(PipelineStateGLImpl), + sizeof(ShaderResourceBindingGLImpl), + sizeof(FenceGLImpl) + } }, // Device caps must be filled in before the constructor of Pipeline Cache is called! m_GLContext(InitAttribs, m_DeviceCaps, pSCDesc), -- cgit v1.2.3