Diligent Engine
 
Loading...
Searching...
No Matches
Diligent::ITextureView Struct Referenceabstract

Texture view interface. More...

#include <TextureView.h>

Inheritance diagram for Diligent::ITextureView:
Diligent::IDeviceObject Diligent.IObject Diligent::ITextureViewD3D11 Diligent::ITextureViewD3D12 Diligent::ITextureViewGL Diligent::ITextureViewMtl Diligent::ITextureViewVk Diligent::ITextureViewWebGPU

Public Member Functions

virtual const TextureViewDesc &DILIGENT_CALL_TYPE GetDesc () const override=0
 Returns the texture view description used to create the object.
 
virtual void DILIGENT_CALL_TYPE SetSampler (struct ISampler *pSampler)=0
 
virtual struct ISampler *DILIGENT_CALL_TYPE GetSampler ()=0
 Returns the pointer to the sampler object set by the ITextureView::SetSampler().
 
virtual struct ITexture *DILIGENT_CALL_TYPE GetTexture ()=0
 Returns a pointer to the referenced texture object.
 
- Public Member Functions inherited from Diligent::IDeviceObject
virtual Int32 DILIGENT_CALL_TYPE GetUniqueID () const =0
 Returns unique identifier assigned to an object.
 
virtual void DILIGENT_CALL_TYPE SetUserData (IObject *pUserData)=0
 Stores a pointer to the user-provided data object.
 
virtual IObject *DILIGENT_CALL_TYPE GetUserData () const =0
 Returns a pointer to the user data object previously set with SetUserData() method.
 
- Public Member Functions inherited from Diligent.IObject
virtual void DILIGENT_CALL_TYPE QueryInterface (const INTERFACE_ID &IID, IObject **ppInterface)=0
 Queries the specific interface.
 
virtual ReferenceCounterValueType DILIGENT_CALL_TYPE AddRef ()=0
 Increments the number of strong references by 1.
 
virtual ReferenceCounterValueType DILIGENT_CALL_TYPE Release ()=0
 
virtual IReferenceCounters *DILIGENT_CALL_TYPE GetReferenceCounters () const =0
 

Detailed Description

Texture view interface.

To create a texture view, call ITexture::CreateView(). Texture view holds strong references to the texture. The texture will not be destroyed until all views are released. The texture view will also keep a strong reference to the texture sampler, if any is set.

Member Function Documentation

◆ GetSampler()

virtual struct ISampler *DILIGENT_CALL_TYPE Diligent::ITextureView::GetSampler ( )
pure virtual

Returns the pointer to the sampler object set by the ITextureView::SetSampler().

The method does NOT increment the reference counter of the returned object, so Release() must not be called.

◆ GetTexture()

virtual struct ITexture *DILIGENT_CALL_TYPE Diligent::ITextureView::GetTexture ( )
pure virtual

Returns a pointer to the referenced texture object.

The method does NOT increment the reference counter of the returned object, so Release() must not be called.

◆ SetSampler()

virtual void DILIGENT_CALL_TYPE Diligent::ITextureView::SetSampler ( struct ISampler * pSampler)
pure virtual

Sets the texture sampler to use for filtering operations when accessing a texture from shaders. Only shader resource views can be assigned a sampler. The view will keep strong reference to the sampler.