All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HgiGLTexture Class Referencefinal

#include <texture.h>

+ Inheritance diagram for HgiGLTexture:

Public Member Functions

HGIGL_API ~HgiGLTexture () override
HGIGL_API size_t GetByteSizeOfResource () const override
HGIGL_API uint64_t GetRawResource () const override
uint32_t GetTextureId () const
 Returns the OpenGL id / name of the texture. More...
- Public Member Functions inherited from HgiTexture
virtual HGI_API ~HgiTexture ()
HGI_API HgiTextureDesc constGetDescriptor () const
 The descriptor describes the object. More...

Protected Member Functions

HGIGL_API HgiGLTexture (HgiTextureDesc const &desc)
- Protected Member Functions inherited from HgiTexture
HGI_API HgiTexture (HgiTextureDesc const &desc)


class HgiGL

Additional Inherited Members

- Protected Attributes inherited from HgiTexture
HgiTextureDesc _descriptor

Detailed Description

Represents a OpenGL GPU texture resource.

Definition at line 38 of file texture.h.

Constructor & Destructor Documentation

HGIGL_API HgiGLTexture::~HgiGLTexture ( )
HGIGL_API HgiGLTexture::HgiGLTexture ( HgiTextureDesc const desc)

Member Function Documentation

HGIGL_API size_t HgiGLTexture::GetByteSizeOfResource ( ) const

Returns the byte size of the GPU texture. This can be helpful if the application wishes to tally up memory usage.

Implements HgiTexture.

HGIGL_API uint64_t HgiGLTexture::GetRawResource ( ) const

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.

Implements HgiTexture.

uint32_t HgiGLTexture::GetTextureId ( ) const

Returns the OpenGL id / name of the texture.

Definition at line 51 of file texture.h.

Friends And Related Function Documentation

friend class HgiGL

Definition at line 54 of file texture.h.

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