Loading...
Searching...
No Matches
sampler.h
1//
2// Copyright 2020 Pixar
3//
4// Licensed under the terms set forth in the LICENSE.txt file available at
5// https://openusd.org/license.
6//
7#ifndef PXR_IMAGING_HGIGL_SAMPLER_H
8#define PXR_IMAGING_HGIGL_SAMPLER_H
9
10#include "pxr/imaging/hgi/sampler.h"
11
12#include "pxr/imaging/hgiGL/api.h"
13
14
15PXR_NAMESPACE_OPEN_SCOPE
16
17
19
25class HgiGLSampler final : public HgiSampler
26{
27public:
28 HGIGL_API
29 ~HgiGLSampler() override;
30
31 HGIGL_API
32 uint64_t GetRawResource() const override;
33
35 HGIGL_API
36 uint32_t GetSamplerId() const;
37
39 HGIGL_API
40 uint64_t GetBindlessHandle(HgiTextureHandle const &textureHandle);
41
42protected:
43 friend class HgiGL;
44
45 HGIGL_API
46 HgiGLSampler(HgiSamplerDesc const& desc);
47
48private:
49 HgiGLSampler() = delete;
50 HgiGLSampler & operator=(const HgiGLSampler&) = delete;
51 HgiGLSampler(const HgiGLSampler&) = delete;
52
53private:
54 uint32_t _samplerId;
55 uint32_t _bindlessTextureId;
56 uint64_t _bindlessHandle;
57};
58
59
60PXR_NAMESPACE_CLOSE_SCOPE
61
62#endif
OpenGL implementation of the Hydra Graphics Interface.
Definition: hgi.h:55
OpenGL implementation of HgiSampler.
Definition: sampler.h:26
HGIGL_API uint64_t GetBindlessHandle(HgiTextureHandle const &textureHandle)
Returns the bindless gpu handle (caller must verify extension support)
HGIGL_API uint32_t GetSamplerId() const
Returns the gl resource id of the sampler.
HGIGL_API uint64_t GetRawResource() const override
This function returns the handle to the Hgi backend's gpu resource, cast to a uint64_t.
Represents a graphics platform independent GPU sampler resource that perform texture sampling operati...
Definition: sampler.h:108
Describes the properties needed to create a GPU sampler.
Definition: sampler.h:62