HDK
|
#include <texture.h>
Public Member Functions | |
virtual HGI_API | ~HgiTexture () |
HGI_API HgiTextureDesc const & | GetDescriptor () const |
The descriptor describes the object. More... | |
virtual HGI_API size_t | GetByteSizeOfResource () const =0 |
virtual HGI_API uint64_t | GetRawResource () const =0 |
virtual HGI_API void | SubmitLayoutChange (HgiTextureUsage newLayout)=0 |
Protected Member Functions | |
HGI_API | HgiTexture (HgiTextureDesc const &desc) |
Static Protected Member Functions | |
static HGI_API size_t | _GetByteSizeOfResource (const HgiTextureDesc &descriptor) |
Protected Attributes | |
HgiTextureDesc | _descriptor |
Represents a graphics platform independent GPU texture resource. Textures should be created via Hgi::CreateTexture.
Base class for Hgi textures. To the client (HdSt) texture resources are referred to via opaque, stateless handles (HgTextureHandle).
|
virtual |
|
protected |
|
staticprotected |
|
pure virtual |
Returns the byte size of the GPU texture. This can be helpful if the application wishes to tally up memory usage.
Implemented in HgiGLTexture.
HGI_API HgiTextureDesc const& HgiTexture::GetDescriptor | ( | ) | const |
The descriptor describes the object.
|
pure virtual |
This function returns the handle to the Hgi backend's gpu resource, cast to a uint64_t. Clients should avoid using this function and instead use Hgi base classes so that client code works with any Hgi platform. For transitioning code to Hgi, it can however we useful to directly access a platform's internal resource handles. There is no safety provided in using this. If you by accident pass a HgiMetal resource into an OpenGL call, bad things may happen. In OpenGL this returns the GLuint resource name. In Metal this returns the id<MTLTexture> as uint64_t. In Vulkan this returns the VkImage as uint64_t. In DX12 this returns the ID3D12Resource pointer as uint64_t.
Implemented in HgiGLTexture.
|
pure virtual |
This function initiates a layout change process on this texture resource. This feature is at the moment required explicitly by explicit APIs like Vulkan.
Implemented in HgiGLTexture.
|
protected |