summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngine
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2019-11-08 18:08:20 +0000
committerEgor Yusov <egor.yusov@gmail.com>2019-11-08 18:08:20 +0000
commit5c7f9cc49e2c7e4986003e50dafceeb00420e61f (patch)
tree64b7af8b1f9ae8ab0a11729a8537da23c87b180d /Graphics/GraphicsEngine
parentDirect3D11 backend: updated comments (diff)
downloadDiligentCore-5c7f9cc49e2c7e4986003e50dafceeb00420e61f.tar.gz
DiligentCore-5c7f9cc49e2c7e4986003e50dafceeb00420e61f.zip
Added IDeviceObject::GetUniqueID method (API Version 240039)
Diffstat (limited to 'Graphics/GraphicsEngine')
-rw-r--r--Graphics/GraphicsEngine/include/DeviceObjectBase.h2
-rw-r--r--Graphics/GraphicsEngine/interface/APIInfo.h2
-rw-r--r--Graphics/GraphicsEngine/interface/DeviceObject.h22
-rw-r--r--Graphics/GraphicsEngine/interface/Texture.h2
4 files changed, 24 insertions, 4 deletions
diff --git a/Graphics/GraphicsEngine/include/DeviceObjectBase.h b/Graphics/GraphicsEngine/include/DeviceObjectBase.h
index f1e8e0b0..44011d8c 100644
--- a/Graphics/GraphicsEngine/include/DeviceObjectBase.h
+++ b/Graphics/GraphicsEngine/include/DeviceObjectBase.h
@@ -136,7 +136,7 @@ public:
}
/// Returns unique identifier
- UniqueIdentifier GetUniqueID()const
+ virtual Int32 GetUniqueID()const override final
{
/// \note
/// This unique ID is used to unambiguously identify device object for
diff --git a/Graphics/GraphicsEngine/interface/APIInfo.h b/Graphics/GraphicsEngine/interface/APIInfo.h
index 298b84c5..70de6f5a 100644
--- a/Graphics/GraphicsEngine/interface/APIInfo.h
+++ b/Graphics/GraphicsEngine/interface/APIInfo.h
@@ -26,7 +26,7 @@
/// \file
/// Diligent API information
-#define DILIGENT_API_VERSION 240038
+#define DILIGENT_API_VERSION 240039
#include "../../../Primitives/interface/BasicTypes.h"
diff --git a/Graphics/GraphicsEngine/interface/DeviceObject.h b/Graphics/GraphicsEngine/interface/DeviceObject.h
index bd7e8c61..1d175cf5 100644
--- a/Graphics/GraphicsEngine/interface/DeviceObject.h
+++ b/Graphics/GraphicsEngine/interface/DeviceObject.h
@@ -43,8 +43,28 @@ public:
/// Queries the specific interface, see IObject::QueryInterface() for details
virtual void QueryInterface( const INTERFACE_ID& IID, IObject** ppInterface )override = 0;
- /// Returns the buffer object description
+
+ /// Returns the object description
virtual const DeviceObjectAttribs& GetDesc()const = 0;
+
+
+ /// Returns unique identifier assigned to an object
+
+ /// \remarks Unique identifiers can be used to reliably check if two objects are identical.
+ /// Note that the engine resuses memory reclaimed after an object has been released.
+ /// For example, if a texture object is released and then another texture is created,
+ /// the engine may return the same pointer, so pointer-to-pointer comparisons are not
+ /// reliable. Unique identifiers, on the other hand, are guaranteed to be, well, unique.
+ ///
+ /// Unique identifiers are object-specifics, so, for instance, buffer identifiers
+ /// are not comparable to texture identifiers.
+ ///
+ /// Unique identifiers are only meaningful within one session. After an application
+ /// restarts, all identifiers become invalid.
+ ///
+ /// Valid identifiers are always positive values. Zero and negative values can never be
+ /// assigned to an object and are always guaranteed to be invalid.
+ virtual Int32 GetUniqueID() const = 0;
};
}
diff --git a/Graphics/GraphicsEngine/interface/Texture.h b/Graphics/GraphicsEngine/interface/Texture.h
index 6e328f83..cc5a1ebe 100644
--- a/Graphics/GraphicsEngine/interface/Texture.h
+++ b/Graphics/GraphicsEngine/interface/Texture.h
@@ -106,7 +106,7 @@ struct TextureDesc : DeviceObjectAttribs
TEXTURE_FORMAT Format = TEX_FORMAT_UNKNOWN;
/// Number of Mip levels in the texture. Multisampled textures can only have 1 Mip level.
- /// Specify 0 to generate full mipmap chain.
+ /// Specify 0 to create full mipmap chain.
Uint32 MipLevels = 1;
/// Number of samples.\n