Diligent Engine
 
Loading...
Searching...
No Matches
Diligent::TextureViewBase< EngineImplTraits > Class Template Reference

Template class implementing base functionality of the texture view interface. More...

#include <TextureViewBase.hpp>

Inheritance diagram for Diligent::TextureViewBase< EngineImplTraits >:
Diligent::DeviceObjectBase< EngineImplTraits::TextureViewInterface, EngineImplTraits::RenderDeviceImplType, TextureViewDesc > Diligent::ObjectBase< EngineImplTraits::TextureViewInterface > Diligent::RefCountedObject< EngineImplTraits::TextureViewInterface >

Public Member Functions

 TextureViewBase (IReferenceCounters *pRefCounters, RenderDeviceImplType *pDevice, const TextureViewDesc &ViewDesc, ITexture *pTexture, bool bIsDefaultView, bool bIsDeviceInternal=false)
 
virtual void DILIGENT_CALL_TYPE SetSampler (ISampler *pSampler) override final
 Implementation of ITextureView::SetSampler()
 
virtual ISampler *DILIGENT_CALL_TYPE GetSampler () override final
 Implementation of ITextureView::GetSampler()
 
virtual ITexture *DILIGENT_CALL_TYPE GetTexture () override final
 Implementation of ITextureView::GetTexture()
 
- Public Member Functions inherited from Diligent::DeviceObjectBase< EngineImplTraits::TextureViewInterface, EngineImplTraits::RenderDeviceImplType, TextureViewDesc >
 DeviceObjectBase (IReferenceCounters *pRefCounters, RenderDeviceImplType *pDevice, const TextureViewDesc &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 Attributes

RefCntAutoPtr< ISamplerm_pSampler
 Strong reference to the sampler.
 
ITexture *const m_pTexture
 Raw pointer to the texture.
 
RefCntAutoPtr< ITexturem_spTexture
 
- Protected Attributes inherited from Diligent::DeviceObjectBase< EngineImplTraits::TextureViewInterface, EngineImplTraits::RenderDeviceImplType, TextureViewDesc >
RenderDeviceImplType *const m_pDevice
 Pointer to the device.
 
TextureViewDesc m_Desc
 Object description.
 

Detailed Description

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

Template class implementing base functionality of the texture view interface.

Template Parameters
EngineImplTraits- Engine implementation type traits.

Constructor & Destructor Documentation

◆ TextureViewBase()

template<typename EngineImplTraits>
Diligent::TextureViewBase< EngineImplTraits >::TextureViewBase ( IReferenceCounters * pRefCounters,
RenderDeviceImplType * pDevice,
const TextureViewDesc & ViewDesc,
ITexture * pTexture,
bool bIsDefaultView,
bool bIsDeviceInternal = false )
inline
Parameters
pRefCounters- Reference counters object that controls the lifetime of this texture view.
pDevice- Pointer to the render device.
ViewDesc- Texture view description.
pTexture- Pointer to the texture that the view is to be created for.
bIsDefaultView- Flag indicating if the view is default view, and is thus part of the texture object. In this case the view will attach to the texture's reference counters.
bIsDeviceInternal- Flag indicating if the texture is an internal device object and must not keep a strong reference to the device

Member Data Documentation

◆ m_spTexture

template<typename EngineImplTraits>
RefCntAutoPtr<ITexture> Diligent::TextureViewBase< EngineImplTraits >::m_spTexture
protected

Strong reference to the texture. Used for non-default views to keep the texture alive