24 #ifndef PXR_IMAGING_HD_ST_SAMPLER_OBJECT_H
25 #define PXR_IMAGING_HD_ST_SAMPLER_OBJECT_H
28 #include "pxr/imaging/hdSt/api.h"
30 #include "pxr/imaging/hgi/handle.h"
31 #include "pxr/imaging/hd/enums.h"
32 #include "pxr/imaging/hd/types.h"
36 PXR_NAMESPACE_OPEN_SCOPE
43 class HdSt_SamplerObjectRegistry;
46 using HdStSamplerObjectSharedPtr =
47 std::shared_ptr<class HdStSamplerObject>;
73 HdSt_SamplerObjectRegistry * samplerObjectRegistry);
76 HdSt_SamplerObjectRegistry *
const _samplerObjectRegistry;
89 bool createBindlessHandle,
90 HdSt_SamplerObjectRegistry * samplerObjectRegistry);
93 ~HdStUvSamplerObject()
override;
107 return _glTextureSamplerHandle;
112 const uint64_t _glTextureSamplerHandle;
124 bool createBindlessHandle,
125 HdSt_SamplerObjectRegistry * samplerObjectRegistry);
141 return _glTextureSamplerHandle;
146 const uint64_t _glTextureSamplerHandle;
160 bool createBindlessHandle,
161 HdSt_SamplerObjectRegistry * samplerObjectRegistry);
168 return _texelsSampler;
177 return _texelsGLTextureHandle;
183 return _layoutGLTextureHandle;
189 const uint64_t _texelsGLTextureHandle;
190 const uint64_t _layoutGLTextureHandle;
204 bool createBindlessHandle,
205 HdSt_SamplerObjectRegistry * samplerObjectRegistry);
212 return _texelsSampler;
221 return _texelsGLTextureHandle;
227 return _layoutGLTextureHandle;
233 const uint64_t _texelsGLTextureHandle;
234 const uint64_t _layoutGLTextureHandle;
237 template<HdTextureType textureType>
238 struct HdSt_TypedSamplerObjectHelper;
245 template<HdTextureType textureType>
247 typename HdSt_TypedSamplerObjectHelper<textureType>::type;
250 struct HdSt_TypedSamplerObjectHelper<HdTextureType::Uv> {
255 struct HdSt_TypedSamplerObjectHelper<HdTextureType::Field> {
260 struct HdSt_TypedSamplerObjectHelper<HdTextureType::Ptex> {
265 struct HdSt_TypedSamplerObjectHelper<HdTextureType::Udim> {
269 PXR_NAMESPACE_CLOSE_SCOPE
uint64_t GetTexelsGLTextureHandle() const
The GL texture handle for bindless textures (as returned by glGetTextureHandleARB).
const HgiSamplerHandle & GetSampler() const
The sampler.
A sampler suitable for Udim textures (wraps one GPU sampler for the texels texture).
Ptex doesn't bind samplers, so this class is just holding the texture handles for bindless textures...
A base class encapsulating a GPU sampler object and, optionally, a texture sampler handle (for bindle...
uint64_t GetGLTextureSamplerHandle() const
The GL sampler texture handle for bindless textures (as returned by glGetTextureSamplerHandleARB).
const HgiSamplerHandle & GetTexelsSampler() const
The GPU sampler object for the texels texture.
const HgiSamplerHandle & GetSampler() const
The sampler.
Hydra Graphics Interface.
A uvw texture with a bounding box describing how to transform it.
uint64_t GetLayoutGLTextureHandle() const
Similar to GetGLTexelsTextureHandle but for layout.
A sampler suitable for HdStFieldTextureObject.
Collection of standard parameters such as wrap modes to sample a texture.
A template alias such that, e.g., HdStUvSamplerObject can be accessed as HdStTypedSamplerObject<HdTex...
const HgiSamplerHandle & GetTexelsSampler() const
The GPU sampler object for the texels texture.
A sampler suitable for HdStUvTextureObject.
uint64_t GetTexelsGLTextureHandle() const
The GL texture handle for bindless textures (as returned by glGetTextureHandleARB).
uint64_t GetGLTextureSamplerHandle() const
The GL sampler texture handle for bindless textures (as returned by glGetTextureSamplerHandleARB).
A base class for uv textures.
uint64_t GetLayoutGLTextureHandle() const
Similar to GetGLTexelsTextureHandle but for layout.