diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2016-08-20 06:35:47 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2016-08-20 06:35:47 +0000 |
| commit | 2b64f003622ee7871fd7aec041622427dd2fc88f (patch) | |
| tree | 893dab48c6d0e7121e047d8d3bb6d5bf172ce2d5 /Common/interface | |
| parent | Release v1.0.0 (diff) | |
| download | DiligentCore-2b64f003622ee7871fd7aec041622427dd2fc88f.tar.gz DiligentCore-2b64f003622ee7871fd7aec041622427dd2fc88f.zip | |
Updated to Diligent Engine 2.0
Diffstat (limited to 'Common/interface')
| -rw-r--r-- | Common/interface/AdvancedMath.h | 2 | ||||
| -rw-r--r-- | Common/interface/BasicMath.h | 2 | ||||
| -rw-r--r-- | Common/interface/DataBlob.h | 2 | ||||
| -rw-r--r-- | Common/interface/FileStream.h | 2 | ||||
| -rw-r--r-- | Common/interface/MemoryAllocator.h (renamed from Common/interface/ComPtr.h) | 26 | ||||
| -rw-r--r-- | Common/interface/Object.h | 2 | ||||
| -rw-r--r-- | Common/interface/ReferenceCounters.h | 2 |
7 files changed, 20 insertions, 18 deletions
diff --git a/Common/interface/AdvancedMath.h b/Common/interface/AdvancedMath.h index c4af54ad..d6623875 100644 --- a/Common/interface/AdvancedMath.h +++ b/Common/interface/AdvancedMath.h @@ -1,4 +1,4 @@ -/* Copyright 2015 Egor Yusov +/* Copyright 2015-2016 Egor Yusov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/Common/interface/BasicMath.h b/Common/interface/BasicMath.h index 95b35974..19d54ec2 100644 --- a/Common/interface/BasicMath.h +++ b/Common/interface/BasicMath.h @@ -1,4 +1,4 @@ -/* Copyright 2015 Egor Yusov +/* Copyright 2015-2016 Egor Yusov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/Common/interface/DataBlob.h b/Common/interface/DataBlob.h index 2940f1d3..abc60215 100644 --- a/Common/interface/DataBlob.h +++ b/Common/interface/DataBlob.h @@ -1,4 +1,4 @@ -/* Copyright 2015 Egor Yusov +/* Copyright 2015-2016 Egor Yusov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/Common/interface/FileStream.h b/Common/interface/FileStream.h index 1263ef42..75aba909 100644 --- a/Common/interface/FileStream.h +++ b/Common/interface/FileStream.h @@ -1,4 +1,4 @@ -/* Copyright 2015 Egor Yusov +/* Copyright 2015-2016 Egor Yusov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/Common/interface/ComPtr.h b/Common/interface/MemoryAllocator.h index 94e4b1f2..d7e3289e 100644 --- a/Common/interface/ComPtr.h +++ b/Common/interface/MemoryAllocator.h @@ -1,4 +1,4 @@ -/* Copyright 2015 Egor Yusov +/* Copyright 2015-2016 Egor Yusov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,20 +24,22 @@ #pragma once /// \file -/// Defines Diligent::CComPtr +/// Defines Diligent::IMemoryAllocator interface -#include "RefCntAutoPtr.h" +#include "BasicTypes.h" namespace Diligent { - template<typename T> - class BlockAddRefReleaseCOM : public T - { - private: - virtual decltype( reinterpret_cast<T*>(nullptr)->AddRef() ) STDMETHODCALLTYPE AddRef()override = 0; - virtual decltype( reinterpret_cast<T*>(nullptr)->Release() ) STDMETHODCALLTYPE Release()override = 0; - }; - template<typename T> - using CComPtr = Diligent::RefCntAutoPtr<T, BlockAddRefReleaseCOM>; +/// Base interface for a raw memory allocator +class IMemoryAllocator +{ +public: + /// Allocates block of memory + virtual void* Allocate( size_t Size, const Char* dbgDescription, const char* dbgFileName, const Int32 dbgLineNumber) = 0; + + /// Releases memory + virtual void Free(void *Ptr) = 0; +}; + } diff --git a/Common/interface/Object.h b/Common/interface/Object.h index b404889e..b8153c1e 100644 --- a/Common/interface/Object.h +++ b/Common/interface/Object.h @@ -1,4 +1,4 @@ -/* Copyright 2015 Egor Yusov +/* Copyright 2015-2016 Egor Yusov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/Common/interface/ReferenceCounters.h b/Common/interface/ReferenceCounters.h index ffef91d5..64ced644 100644 --- a/Common/interface/ReferenceCounters.h +++ b/Common/interface/ReferenceCounters.h @@ -1,4 +1,4 @@ -/* Copyright 2015 Egor Yusov +/* Copyright 2015-2016 Egor Yusov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. |
