HDK
|
#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 const & | GetViewTexture () const |
Returns the handle to the texture that aliases another texture. More... | |
Protected Attributes | |
HgiTextureHandle | _viewTexture |
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).
HGI_API HgiTextureView::HgiTextureView | ( | HgiTextureViewDesc const & | desc | ) |
|
virtual |
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.
|
protected |