summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngine
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2019-10-30 17:46:28 +0000
committerEgor Yusov <egor.yusov@gmail.com>2019-10-30 17:46:28 +0000
commit13440e98e8cd926620d9913aa72780ceaca4f668 (patch)
tree1d40d82d0f450a2b2678642d6db9eff055dbee94 /Graphics/GraphicsEngine
parentFixed few more gcc/clang compile issue (diff)
downloadDiligentCore-13440e98e8cd926620d9913aa72780ceaca4f668.tar.gz
DiligentCore-13440e98e8cd926620d9913aa72780ceaca4f668.zip
Some code refactoring
Diffstat (limited to 'Graphics/GraphicsEngine')
-rw-r--r--Graphics/GraphicsEngine/include/DeviceContextBase.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/Graphics/GraphicsEngine/include/DeviceContextBase.h b/Graphics/GraphicsEngine/include/DeviceContextBase.h
index 7c67dd16..5ed6dc56 100644
--- a/Graphics/GraphicsEngine/include/DeviceContextBase.h
+++ b/Graphics/GraphicsEngine/include/DeviceContextBase.h
@@ -68,6 +68,7 @@ class DeviceContextBase : public ObjectBase<BaseInterface>
{
public:
using TObjectBase = ObjectBase<BaseInterface>;
+ using DeviceImplType = typename ImplementationTraits::DeviceType;
using BufferImplType = typename ImplementationTraits::BufferType;
using TextureImplType = typename ImplementationTraits::TextureType;
using PipelineStateImplType = typename ImplementationTraits::PipelineStateType;
@@ -76,10 +77,10 @@ public:
/// \param pRefCounters - reference counters object that controls the lifetime of this device context.
/// \param pRenderDevice - render device.
/// \param bIsDeferred - flag indicating if this instance is a deferred context
- DeviceContextBase(IReferenceCounters* pRefCounters, IRenderDevice* pRenderDevice, bool bIsDeferred) :
- TObjectBase(pRefCounters),
- m_pDevice(pRenderDevice),
- m_bIsDeferred(bIsDeferred)
+ DeviceContextBase(IReferenceCounters* pRefCounters, DeviceImplType* pRenderDevice, bool bIsDeferred) :
+ TObjectBase {pRefCounters },
+ m_pDevice {pRenderDevice},
+ m_bIsDeferred{bIsDeferred }
{
}
@@ -221,7 +222,7 @@ protected:
#endif
/// Strong reference to the device.
- RefCntAutoPtr<IRenderDevice> m_pDevice;
+ RefCntAutoPtr<DeviceImplType> m_pDevice;
/// Strong reference to the swap chain. Swap chain holds
/// weak reference to the immediate context.