summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsTools
diff options
context:
space:
mode:
authorassiduous <assiduous@diligentgraphics.com>2020-12-08 04:29:24 +0000
committerassiduous <assiduous@diligentgraphics.com>2020-12-08 04:29:24 +0000
commitb931a7523bf7f32a9a6c4d1464cd2d89e294f953 (patch)
tree194e3427cf32653d963f972335d9e51423139e9b /Graphics/GraphicsTools
parentMoved pDevice parameter from BufferSuballocatorCreateInfo and DynamicTextureA... (diff)
downloadDiligentCore-b931a7523bf7f32a9a6c4d1464cd2d89e294f953.tar.gz
DiligentCore-b931a7523bf7f32a9a6c4d1464cd2d89e294f953.zip
Updated CreateBufferSuballocator and CreateDynamicTextureAtlas functions to take const references to create info
Diffstat (limited to 'Graphics/GraphicsTools')
-rw-r--r--Graphics/GraphicsTools/interface/BufferSuballocator.h6
-rw-r--r--Graphics/GraphicsTools/interface/DynamicTextureAtlas.h6
-rw-r--r--Graphics/GraphicsTools/src/BufferSuballocator.cpp12
-rw-r--r--Graphics/GraphicsTools/src/DynamicTextureAtlas.cpp12
4 files changed, 18 insertions, 18 deletions
diff --git a/Graphics/GraphicsTools/interface/BufferSuballocator.h b/Graphics/GraphicsTools/interface/BufferSuballocator.h
index 7ec6b2db..59251962 100644
--- a/Graphics/GraphicsTools/interface/BufferSuballocator.h
+++ b/Graphics/GraphicsTools/interface/BufferSuballocator.h
@@ -131,8 +131,8 @@ struct BufferSuballocatorCreateInfo
/// buffer will be created when GetBuffer() is called.
/// \param[in] CreateInfo - Suballocator create info, see Diligent::BufferSuballocatorCreateInfo.
/// \param[in] ppBufferSuballocator - Memory location where pointer to the buffer suballocator will be stored.
-void CreateBufferSuballocator(IRenderDevice* pDevice,
- BufferSuballocatorCreateInfo& CreateInfo,
- IBufferSuballocator** ppBufferSuballocator);
+void CreateBufferSuballocator(IRenderDevice* pDevice,
+ const BufferSuballocatorCreateInfo& CreateInfo,
+ IBufferSuballocator** ppBufferSuballocator);
} // namespace Diligent
diff --git a/Graphics/GraphicsTools/interface/DynamicTextureAtlas.h b/Graphics/GraphicsTools/interface/DynamicTextureAtlas.h
index 31c4b2a5..ebaf1dc8 100644
--- a/Graphics/GraphicsTools/interface/DynamicTextureAtlas.h
+++ b/Graphics/GraphicsTools/interface/DynamicTextureAtlas.h
@@ -154,8 +154,8 @@ struct DynamicTextureAtlasCreateInfo
/// when GetTexture() is called.
/// \param[in] CreateInfo - Atlas create info, see Diligent::DynamicTextureAtlasCreateInfo.
/// \param[in] ppAtlas - Memory location where pointer to the texture atlas object will be written.
-void CreateDynamicTextureAtlas(IRenderDevice* pDevice,
- DynamicTextureAtlasCreateInfo& CreateInfo,
- IDynamicTextureAtlas** ppAtlas);
+void CreateDynamicTextureAtlas(IRenderDevice* pDevice,
+ const DynamicTextureAtlasCreateInfo& CreateInfo,
+ IDynamicTextureAtlas** ppAtlas);
} // namespace Diligent
diff --git a/Graphics/GraphicsTools/src/BufferSuballocator.cpp b/Graphics/GraphicsTools/src/BufferSuballocator.cpp
index 4a5c212c..d683978d 100644
--- a/Graphics/GraphicsTools/src/BufferSuballocator.cpp
+++ b/Graphics/GraphicsTools/src/BufferSuballocator.cpp
@@ -108,9 +108,9 @@ public:
IMPLEMENT_QUERY_INTERFACE_IN_PLACE(IID_BufferSuballocator, TBase)
- BufferSuballocatorImpl(IReferenceCounters* pRefCounters,
- IRenderDevice* pDevice,
- BufferSuballocatorCreateInfo& CreateInfo) :
+ BufferSuballocatorImpl(IReferenceCounters* pRefCounters,
+ IRenderDevice* pDevice,
+ const BufferSuballocatorCreateInfo& CreateInfo) :
// clang-format off
TBase {pRefCounters},
m_Mgr {CreateInfo.Desc.uiSizeInBytes, DefaultRawMemoryAllocator::GetAllocator()},
@@ -227,9 +227,9 @@ IBufferSuballocator* BufferSuballocationImpl::GetAllocator()
}
-void CreateBufferSuballocator(IRenderDevice* pDevice,
- BufferSuballocatorCreateInfo& CreateInfo,
- IBufferSuballocator** ppBufferSuballocator)
+void CreateBufferSuballocator(IRenderDevice* pDevice,
+ const BufferSuballocatorCreateInfo& CreateInfo,
+ IBufferSuballocator** ppBufferSuballocator)
{
try
{
diff --git a/Graphics/GraphicsTools/src/DynamicTextureAtlas.cpp b/Graphics/GraphicsTools/src/DynamicTextureAtlas.cpp
index f8128b5d..026d8f54 100644
--- a/Graphics/GraphicsTools/src/DynamicTextureAtlas.cpp
+++ b/Graphics/GraphicsTools/src/DynamicTextureAtlas.cpp
@@ -112,9 +112,9 @@ class DynamicTextureAtlasImpl final : public ObjectBase<IDynamicTextureAtlas>
public:
using TBase = ObjectBase<IDynamicTextureAtlas>;
- DynamicTextureAtlasImpl(IReferenceCounters* pRefCounters,
- IRenderDevice* pDevice,
- DynamicTextureAtlasCreateInfo& CreateInfo) :
+ DynamicTextureAtlasImpl(IReferenceCounters* pRefCounters,
+ IRenderDevice* pDevice,
+ const DynamicTextureAtlasCreateInfo& CreateInfo) :
// clang-format off
TBase {pRefCounters},
m_Desc {CreateInfo.Desc},
@@ -395,9 +395,9 @@ float4 TextureAtlasSuballocationImpl::GetUVScaleBias() const
}
-void CreateDynamicTextureAtlas(IRenderDevice* pDevice,
- DynamicTextureAtlasCreateInfo& CreateInfo,
- IDynamicTextureAtlas** ppAtlas)
+void CreateDynamicTextureAtlas(IRenderDevice* pDevice,
+ const DynamicTextureAtlasCreateInfo& CreateInfo,
+ IDynamicTextureAtlas** ppAtlas)
{
try
{