HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HgiSampler Class Referenceabstract

#include <sampler.h>

+ Inheritance diagram for HgiSampler:

Public Member Functions

virtual HGI_API ~HgiSampler ()
 
HGI_API HgiSamplerDesc constGetDescriptor () const
 The descriptor describes the object. More...
 
virtual HGI_API uint64_t GetRawResource () const =0
 

Protected Member Functions

HGI_API HgiSampler (HgiSamplerDesc const &desc)
 

Protected Attributes

HgiSamplerDesc _descriptor
 

Detailed Description

Represents a graphics platform independent GPU sampler resource that perform texture sampling operations. Samplers should be created via Hgi::CreateSampler.

Definition at line 96 of file sampler.h.

Constructor & Destructor Documentation

virtual HGI_API HgiSampler::~HgiSampler ( )
virtual
HGI_API HgiSampler::HgiSampler ( HgiSamplerDesc const desc)
protected

Member Function Documentation

HGI_API HgiSamplerDesc const& HgiSampler::GetDescriptor ( ) const

The descriptor describes the object.

virtual HGI_API uint64_t HgiSampler::GetRawResource ( ) const
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<MTLSamplerState> as uint64_t. In Vulkan this returns the VkSampler as uint64_t.

Implemented in HgiGLSampler.

Member Data Documentation

HgiSamplerDesc HgiSampler::_descriptor
protected

Definition at line 123 of file sampler.h.


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