template<typename EngineImplTraits>
TextureBase class
Base implementation of the ITexture interface.
| Template parameters | |
|---|---|
| EngineImplTraits | - Engine implementation type traits. |
Contents
Base classes
-
template<class BaseInterface, typename RenderDeviceImplType, typename ObjectDescType>class DeviceObjectBase<EngineImplTraits::TextureInterface, EngineImplTraits::RenderDeviceImplType, TextureDesc>
- Template class implementing base functionality of the device object.
Constructors, destructors, conversion operators
- TextureBase(IReferenceCounters* pRefCounters, TexViewObjAllocatorType& TexViewObjAllocator, RenderDeviceImplType* pDevice, const TextureDesc& Desc, bool bIsDeviceInternal = false)
Public functions
- void CreateView(const struct TextureViewDesc& ViewDesc, ITextureView** ppView) override
- Implementaiton of ITexture::
CreateView(); calls CreateViewInternal() virtual function that creates texture view for the specific engine implementation. - void CreateDefaultViews()
- Creates default texture views.
-
auto GetDefaultView(TEXTURE_
VIEW_ TYPE ViewType) -> ITextureView* override - Implementation of ITexture::
GetDefaultView().
Protected functions
- void CreateViewInternal(const struct TextureViewDesc& ViewDesc, ITextureView** ppView, bool bIsDefaultView) pure virtual
- Pure virtual function that creates texture view for the specific engine implementation.
Protected variables
- std::unique_ptr<TextureViewImplType, STDDeleter<TextureViewImplType, TexViewObjAllocatorType>> m_pDefaultSRV
- Default SRV addressing the entire texture.
- std::unique_ptr<TextureViewImplType, STDDeleter<TextureViewImplType, TexViewObjAllocatorType>> m_pDefaultRTV
- Default RTV addressing the most detailed mip level.
- std::unique_ptr<TextureViewImplType, STDDeleter<TextureViewImplType, TexViewObjAllocatorType>> m_pDefaultDSV
- Default DSV addressing the most detailed mip level.
- std::unique_ptr<TextureViewImplType, STDDeleter<TextureViewImplType, TexViewObjAllocatorType>> m_pDefaultUAV
- Default UAV addressing the entire texture.
Function documentation
template<typename EngineImplTraits>
Diligent:: TextureBase<EngineImplTraits>:: TextureBase(IReferenceCounters* pRefCounters,
TexViewObjAllocatorType& TexViewObjAllocator,
RenderDeviceImplType* pDevice,
const TextureDesc& Desc,
bool bIsDeviceInternal = false)
| Parameters | |
|---|---|
| pRefCounters | - Reference counters object that controls the lifetime of this texture. |
| TexViewObjAllocator | - Allocator that is used to allocate memory for the instances of the texture view object. This parameter is only used for debug purposes. |
| pDevice | - Pointer to the device |
| Desc | - Texture description |
| bIsDeviceInternal | - Flag indicating if the texture is an internal device object and must not keep a strong reference to the device |
template<typename EngineImplTraits>
void Diligent:: TextureBase<EngineImplTraits>:: CreateDefaultViews()
Creates default texture views.
- Creates default shader resource view addressing the entire texture if Diligent::
BIND_SHADER_RESOURCE flag is set. - Creates default render target view addressing the most detailed mip level if Diligent::
BIND_RENDER_TARGET flag is set. - Creates default depth-stencil view addressing the most detailed mip level if Diligent::
BIND_DEPTH_STENCIL flag is set. - Creates default unordered access view addressing the entire texture if Diligent::
BIND_UNORDERED_ACCESS flag is set.
The function calls CreateViewInternal().