From 321dfe299cd3b15bd0216113068f13dfa4b99cf0 Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Fri, 12 Apr 2019 19:34:18 -0700 Subject: Updated ALLOCATE macros to make it more convenient --- Graphics/GraphicsEngineNextGenBase/include/RenderDeviceNextGenBase.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Graphics/GraphicsEngineNextGenBase') diff --git a/Graphics/GraphicsEngineNextGenBase/include/RenderDeviceNextGenBase.h b/Graphics/GraphicsEngineNextGenBase/include/RenderDeviceNextGenBase.h index 10e2baeb..3f7b42d1 100644 --- a/Graphics/GraphicsEngineNextGenBase/include/RenderDeviceNextGenBase.h +++ b/Graphics/GraphicsEngineNextGenBase/include/RenderDeviceNextGenBase.h @@ -34,6 +34,7 @@ #include "RefCntAutoPtr.h" #include "PlatformMisc.h" #include "ResourceReleaseQueue.h" +#include "EngineMemory.h" namespace Diligent { @@ -56,7 +57,7 @@ public: TBase (pRefCounters, RawMemAllocator, pEngineFactory, NumDeferredContexts, ObjectSizes), m_CmdQueueCount (CmdQueueCount) { - m_CommandQueues = reinterpret_cast(ALLOCATE(this->m_RawMemAllocator, "Raw memory for the device command/release queues", sizeof(CommandQueue)*m_CmdQueueCount)); + m_CommandQueues = ALLOCATE(this->m_RawMemAllocator, "Raw memory for the device command/release queues", CommandQueue, m_CmdQueueCount); for(size_t q=0; q < m_CmdQueueCount; ++q) new(m_CommandQueues+q)CommandQueue(RefCntAutoPtr(Queues[q]), this->m_RawMemAllocator); } -- cgit v1.2.3