![]() |
MAGE
v0.171.0
Matthias Advanced Game Engine
|
#include <texture.hpp>
Public Member Functions | |
Texture (ID3D11Device &device, std::wstring fname) | |
Texture (ID3D11Device &device, std::wstring guid, const D3D11_TEXTURE2D_DESC &desc, const D3D11_SUBRESOURCE_DATA &initial_data) | |
Texture (const Texture &texture)=delete | |
Texture (Texture &&texture) noexcept | |
virtual | ~Texture () |
Texture & | operator= (const Texture &texture)=delete |
Texture & | operator= (Texture &&texture) noexcept |
ID3D11ShaderResourceView * | Get () const noexcept |
template<typename PipelineStageT > | |
void | Bind (ID3D11DeviceContext &device_context, U32 slot) const noexcept |
![]() | |
Resource (std::wstring guid) noexcept | |
Resource (const Resource &resource)=delete | |
Resource (Resource &&resource) noexcept | |
virtual | ~Resource () |
Resource & | operator= (const Resource &resource)=delete |
Resource & | operator= (Resource &&resource) noexcept |
const std::wstring_view | GetGuid () const noexcept |
bool | IsFileResource () const |
const std::filesystem::path | GetPath () const |
Private Attributes | |
ComPtr< ID3D11ShaderResourceView > | m_texture_srv |
A class of textures.
|
explicit |
Constructs a texture.
[in,out] | device | A reference to the device. |
[in] | fname | The filename (the globally unique identifier). |
Exception | Failed to construct the texture. |
|
explicit |
Constructs a 2D texture.
[in,out] | device | A reference to the device. |
[in] | guid | The globally unique identifier. |
[in] | desc | A reference to the texture descriptor. |
[in] | initial_data | A reference to the initial data. |
Exception | Failed to construct the texture. |
|
delete |
Constructs a texture from the given texture.
[in] | texture | A reference to the texture to copy. |
|
defaultnoexcept |
Constructs a texture by moving the given texture.
[in] | texture | A reference to the texture to move. |
|
virtualdefault |
Destructs this texture.
|
noexcept |
Binds this texture.
D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT
. PipelineStageT | The pipeline stage type. |
[in,out] | device_context | A reference to the device context. |
[in] | slot | The index into the device's zero-based array to set the shader resource view to (ranges from 0 to D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT - 1). |
|
noexcept |
Returns a pointer to the shader resource view of this texture.
Copies the given texture to this texture.
[in] | texture | A reference to the texture to copy. |
Moves the given texture to this texture.
[in] | texture | A reference to the texture to move. |
|
private |
A pointer to the shader resource view of this texture.