|
Nameless Engine
|
#include <TextureHandle.h>
Public Member Functions | |
| TextureHandle (const TextureHandle &)=delete | |
| TextureHandle & | operator= (const TextureHandle &)=delete |
| TextureHandle (TextureHandle &&)=delete | |
| TextureHandle & | operator= (TextureHandle &&)=delete |
| GpuResource * | getResource () |
| std::string | getPathToResourceRelativeRes () |
| ~TextureHandle () | |
Private Member Functions | |
| TextureHandle (TextureManager *pTextureManager, const std::string &sPathToResourceRelativeRes, GpuResource *pTexture) | |
Private Attributes | |
| const std::string | sPathToResourceRelativeRes |
| TextureManager *const | pTextureManager = nullptr |
| GpuResource *const | pTexture = nullptr |
Friends | |
| class | TextureManager |
RAII-style object that tells the manager to not release the texture from the memory while it's being used. A texture resource will be released from the memory when no texture handle that references the same resource path will exist.
| ne::TextureHandle::~TextureHandle | ( | ) |
Notifies manager about handle no longer referencing the texture.
|
private |
Creates a new texture handle that references a specific texture resource.
| pTextureManager | Texture manager that created this handle. It will be notified when the texture handle is being destroyed. |
| sPathToResourceRelativeRes | Path to the texture (file/directory) relative to res directory that this texture handle references. |
| pTexture | Texture resource that this handle references. |
| std::string ne::TextureHandle::getPathToResourceRelativeRes | ( | ) |
Path to texture (file/directory) relative to res directory.
res directory. | GpuResource * ne::TextureHandle::getResource | ( | ) |
Returns the underlying GPU resource.
|
private |
Do not delete (free) this pointer. Texture resource that this handle references.
|
private |
Do not delete (free) this pointer. Texture manager that created this object.
|
private |
Path to texture (file/directory) relative to res directory.