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

#include <sampler.h>

+ Inheritance diagram for HgiGLSampler:

Public Member Functions

HGIGL_API ~HgiGLSampler () override
 
HGIGL_API uint64_t GetRawResource () const override
 
HGIGL_API uint32_t GetSamplerId () const
 Returns the gl resource id of the sampler. More...
 
HGIGL_API uint64_t GetBindlessHandle (HgiTextureHandle const &textureHandle)
 Returns the bindless gpu handle (caller must verify extension support) More...
 
- Public Member Functions inherited from HgiSampler
virtual HGI_API ~HgiSampler ()
 
HGI_API HgiSamplerDesc const & GetDescriptor () const
 The descriptor describes the object. More...
 

Protected Member Functions

HGIGL_API HgiGLSampler (HgiSamplerDesc const &desc)
 
- Protected Member Functions inherited from HgiSampler
HGI_API HgiSampler (HgiSamplerDesc const &desc)
 

Friends

class HgiGL
 

Additional Inherited Members

- Protected Attributes inherited from HgiSampler
HgiSamplerDesc _descriptor
 

Detailed Description

OpenGL implementation of HgiSampler

Definition at line 42 of file sampler.h.

Constructor & Destructor Documentation

HGIGL_API HgiGLSampler::~HgiGLSampler ( )
override
HGIGL_API HgiGLSampler::HgiGLSampler ( HgiSamplerDesc const &  desc)
protected

Member Function Documentation

HGIGL_API uint64_t HgiGLSampler::GetBindlessHandle ( HgiTextureHandle const &  textureHandle)

Returns the bindless gpu handle (caller must verify extension support)

HGIGL_API uint64_t HgiGLSampler::GetRawResource ( ) const
overridevirtual

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<MTLSamplerState> as uint64_t. In Vulkan this returns the VkSampler as uint64_t.

Implements HgiSampler.

HGIGL_API uint32_t HgiGLSampler::GetSamplerId ( ) const

Returns the gl resource id of the sampler.

Friends And Related Function Documentation

friend class HgiGL
friend

Definition at line 60 of file sampler.h.


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