HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HgiTextureView Class Reference

#include <texture.h>

Public Member Functions

HGI_API HgiTextureView (HgiTextureViewDesc const &desc)
 
virtual HGI_API ~HgiTextureView ()
 
HGI_API void SetViewTexture (HgiTextureHandle const &handle)
 Set the handle to the texture that aliases another texture. More...
 
HGI_API HgiTextureHandle constGetViewTexture () const
 Returns the handle to the texture that aliases another texture. More...
 

Protected Attributes

HgiTextureHandle _viewTexture
 

Detailed Description

Represents a graphics platform independent GPU texture view resource. Texture Views should be created via Hgi::CreateTextureView.

A TextureView aliases the data of another texture and is a thin wrapper around a HgiTextureHandle. The embeded texture handle is used to add the texture to resource bindings for use in shaders.

For example when using a compute shader to fill the mip levels of a texture, like a lightDome texture, we can use a texture view to give the shader access to a specific mip level of a sourceTexture via a TextureView.

Another example is to conserve resources by reusing a RGBAF32 texture as a RGBAI32 texture once the F32 texture is no longer needed (transient resources).

Definition at line 286 of file texture.h.

Constructor & Destructor Documentation

HGI_API HgiTextureView::HgiTextureView ( HgiTextureViewDesc const desc)
virtual HGI_API HgiTextureView::~HgiTextureView ( )
virtual

Member Function Documentation

HGI_API HgiTextureHandle const& HgiTextureView::GetViewTexture ( ) const

Returns the handle to the texture that aliases another texture.

HGI_API void HgiTextureView::SetViewTexture ( HgiTextureHandle const handle)

Set the handle to the texture that aliases another texture.

Member Data Documentation

HgiTextureHandle HgiTextureView::_viewTexture
protected

Definition at line 304 of file texture.h.


The documentation for this class was generated from the following file: