Diligent Engine
 
Loading...
Searching...
No Matches
Diligent::TextureBase< EngineImplTraits > Class Template Referenceabstract

Base implementation of the ITexture interface. More...

#include <TextureBase.hpp>

Inheritance diagram for Diligent::TextureBase< EngineImplTraits >:
Diligent::DeviceObjectBase< EngineImplTraits::TextureInterface, EngineImplTraits::RenderDeviceImplType, TextureDesc > Diligent::ObjectBase< EngineImplTraits::TextureInterface > Diligent::RefCountedObject< EngineImplTraits::TextureInterface >

Public Member Functions

 TextureBase (IReferenceCounters *pRefCounters, TexViewObjAllocatorType &TexViewObjAllocator, RenderDeviceImplType *pDevice, const TextureDesc &Desc, bool bIsDeviceInternal=false)
 
virtual void DILIGENT_CALL_TYPE CreateView (const struct TextureViewDesc &ViewDesc, ITextureView **ppView) override
 
void CreateDefaultViews ()
 Creates default texture views.
 
virtual ITextureView *DILIGENT_CALL_TYPE GetDefaultView (TEXTURE_VIEW_TYPE ViewType) override
 Implementation of ITexture::GetDefaultView().
 
virtual const SparseTextureProperties &DILIGENT_CALL_TYPE GetSparseProperties () const override final
 Implementation of ITexture::GetSparseProperties().
 
- Public Member Functions inherited from Diligent::DeviceObjectBase< EngineImplTraits::TextureInterface, EngineImplTraits::RenderDeviceImplType, TextureDesc >
 DeviceObjectBase (IReferenceCounters *pRefCounters, RenderDeviceImplType *pDevice, const TextureDesc &ObjDesc, bool bIsDeviceInternal=false)
 
virtual Int32 DILIGENT_CALL_TYPE GetUniqueID () const override final
 Returns unique identifier.
 
virtual void DILIGENT_CALL_TYPE SetUserData (IObject *pUserData) override final
 Implementation of IDeviceObject::SetUserData.
 
virtual IObject *DILIGENT_CALL_TYPE GetUserData () const override final
 Implementation of IDeviceObject::GetUserData.
 

Protected Member Functions

virtual void CreateViewInternal (const struct TextureViewDesc &ViewDesc, ITextureView **ppView, bool bIsDefaultView)=0
 Pure virtual function that is implemented in every backend.
 

Additional Inherited Members

- Protected Attributes inherited from Diligent::DeviceObjectBase< EngineImplTraits::TextureInterface, EngineImplTraits::RenderDeviceImplType, TextureDesc >
RenderDeviceImplType *const m_pDevice
 Pointer to the device.
 
TextureDesc m_Desc
 Object description.
 

Detailed Description

template<typename EngineImplTraits>
class Diligent::TextureBase< EngineImplTraits >

Base implementation of the ITexture interface.

Template Parameters
EngineImplTraits- Engine implementation type traits.

Constructor & Destructor Documentation

◆ TextureBase()

template<typename EngineImplTraits>
Diligent::TextureBase< EngineImplTraits >::TextureBase ( IReferenceCounters * pRefCounters,
TexViewObjAllocatorType & TexViewObjAllocator,
RenderDeviceImplType * pDevice,
const TextureDesc & Desc,
bool bIsDeviceInternal = false )
inline
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

Member Function Documentation

◆ CreateDefaultViews()

template<typename EngineImplTraits>
void Diligent::TextureBase< EngineImplTraits >::CreateDefaultViews ( )
inline

Creates default texture views.

The function calls CreateViewInternal().

◆ CreateView()

template<typename EngineImplTraits>
virtual void DILIGENT_CALL_TYPE Diligent::TextureBase< EngineImplTraits >::CreateView ( const struct TextureViewDesc & ViewDesc,
ITextureView ** ppView )
inlineoverridevirtual

Implementation of ITexture::CreateView(); calls CreateViewInternal() virtual function that creates texture view for the specific engine implementation.