Diligent Engine API Reference: Diligent::TextureViewBase< BaseInterface > Class Template Reference

Diligent Engine API Reference

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

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

Inheritance diagram for Diligent::TextureViewBase< BaseInterface >:

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

## Protected Attributes
Diligent::RefCntAutoPtr< ISampler > | m_pSampler
| Strong reference to the sampler.
ITexture * | m_pTexture
| Raw pointer to the texture.
Diligent::RefCntAutoPtr< ITexture > | m_spTexture
| Strong reference to the texture. Used for non-default views to keep the texture alive.
Protected Attributes inherited from Diligent::DeviceObjectBase< BaseInterface, TextureViewDesc >
const String | m_ObjectNameCopy
| Copy of a device object name. More...
TextureViewDesc | m_Desc
| Object description.

## Detailed Description

### template<class BaseInterface>
class Diligent::TextureViewBase< BaseInterface >

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).

## Constructor & Destructor Documentation

## ◆ TextureViewBase()

template<class BaseInterface>

Diligent::TextureViewBase< BaseInterface >::TextureViewBase | ( | IReferenceCounters * | pRefCounters,
|  | IRenderDevice * | pDevice,
|  | const TextureViewDesc & | ViewDesc,
|  | class ITexture * | pTexture,
|  | bool | bIsDefaultView
| ) |  |
| 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.