Diligent Engine API Reference
Public Member Functions | Protected Attributes | List of all members
Diligent::TextureViewBase< BaseInterface, TexViewObjAllocator > Class Template Reference

Template class implementing base functionality for a texture view interface. More...

Inheritance diagram for Diligent::TextureViewBase< BaseInterface, TexViewObjAllocator >:
Diligent::DeviceObjectBase< BaseInterface, TextureViewDesc, TexViewObjAllocator > Diligent::ObjectBase< BaseInterface, TexViewObjAllocator > Diligent::RefCountedObject< BaseInterface, TexViewObjAllocator >

Public Member Functions

 TextureViewBase (TexViewObjAllocator &ObjAllocator, IRenderDevice *pDevice, const TextureViewDesc &ViewDesc, class ITexture *pTexture, bool bIsDefaultView)
 
virtual void SetSampler (class ISampler *pSampler) override final
 Implementation of ITextureView::SetSampler()
 
virtual ISamplerGetSampler () override final
 Implementation of ITextureView::GetSampler()
 
virtual ITextureGetTexture () override final
 Implementation of ITextureView::GetTexture()
 
- Public Member Functions inherited from Diligent::DeviceObjectBase< BaseInterface, TextureViewDesc, TexViewObjAllocator >
 DeviceObjectBase (TexViewObjAllocator &ObjAllocator, class IRenderDevice *pDevice, const TextureViewDesc &ObjDesc, IObject *pOwner=nullptr, bool bIsDeviceInternal=false)
 
UniqueIdentifier GetUniqueID () const
 Returns unique identifier. More...
 

Protected Attributes

Diligent::RefCntAutoPtr< ISamplerm_pSampler
 Strong reference to the sampler.
 
ITexturem_pTexture
 Raw pointer to the texture.
 
Diligent::RefCntAutoPtr< ITexturem_spTexture
 Strong reference to the texture. Used for non-default views to keep the texture alive.
 
- Protected Attributes inherited from Diligent::DeviceObjectBase< BaseInterface, TextureViewDesc, TexViewObjAllocator >
const String m_ObjectNameCopy
 Copy of a device object name. More...
 
TextureViewDesc m_Desc
 Object description.
 

Detailed Description

template<class BaseInterface, class TexViewObjAllocator>
class Diligent::TextureViewBase< BaseInterface, TexViewObjAllocator >

Template class implementing base functionality for a texture view interface.

Template Parameters
BaseInterface- base interface that this class will inheret (Diligent::ITextureViewD3D11, Diligent::ITextureViewD3D12 or Diligent::ITextureViewGL). TexViewObjAllocator - type of the allocator that is used to allocate memory for the texture view object instances

Constructor & Destructor Documentation

template<class BaseInterface, class TexViewObjAllocator>
Diligent::TextureViewBase< BaseInterface, TexViewObjAllocator >::TextureViewBase ( TexViewObjAllocator &  ObjAllocator,
IRenderDevice pDevice,
const TextureViewDesc ViewDesc,
class ITexture pTexture,
bool  bIsDefaultView 
)
inline
Parameters
ObjAllocator- allocator that was used to allocate memory for this instance of the texture view object
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.