summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineOpenGL
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2019-04-06 15:49:17 +0000
committerEgor Yusov <egor.yusov@gmail.com>2019-04-06 15:49:17 +0000
commit696a3cbb5a5f30d2f5000c0db90125d614ea09ca (patch)
treef1c03f120f1cccfa94a583801179212d32d20711 /Graphics/GraphicsEngineOpenGL
parentAdded API info query (diff)
downloadDiligentCore-696a3cbb5a5f30d2f5000c0db90125d614ea09ca.tar.gz
DiligentCore-696a3cbb5a5f30d2f5000c0db90125d614ea09ca.zip
Made IShaderSourceInputStreamFactory derived from IObject (upgraded API Version to 240021)
Diffstat (limited to 'Graphics/GraphicsEngineOpenGL')
-rw-r--r--Graphics/GraphicsEngineOpenGL/include/RenderDeviceGLESImpl.h1
-rw-r--r--Graphics/GraphicsEngineOpenGL/include/RenderDeviceGLImpl.h1
-rw-r--r--Graphics/GraphicsEngineOpenGL/src/EngineFactoryOpenGL.cpp4
-rw-r--r--Graphics/GraphicsEngineOpenGL/src/RenderDeviceGLESImpl.cpp3
-rw-r--r--Graphics/GraphicsEngineOpenGL/src/RenderDeviceGLImpl.cpp23
5 files changed, 20 insertions, 12 deletions
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<IObject**>(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<IObject**>(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),