Hymn to Beauty
C++ 3D Engine
Sampler.hpp
Go to the documentation of this file.
1#pragma once
2
3namespace Video {
4
6class Sampler {
7 public:
9 enum class Filter {
10 NEAREST,
11 LINEAR,
12 COUNT
13 };
14
16 enum class Clamping {
17 REPEAT,
19 COUNT
20 };
21
24
26 virtual ~Sampler() {}
27
28 private:
29 Sampler(const Sampler& other) = delete;
30};
31
32} // namespace Video
Determines how a texture should be sampled.
Definition: Sampler.hpp:6
virtual ~Sampler()
Destructor.
Definition: Sampler.hpp:26
Sampler()
Create a new sampler.
Definition: Sampler.hpp:23
Filter
The interpolation to apply.
Definition: Sampler.hpp:9
@ COUNT
Number of entries in enum.
@ LINEAR
Bilinear filtering.
@ NEAREST
Nearest neighbor.
Clamping
How to handle sampling outside the texture dimensions.
Definition: Sampler.hpp:16
@ COUNT
Number of entries in enum.
@ REPEAT
Repeat the texture.
@ CLAMP_TO_EDGE
Clamp to the edge of the texture.
Definition: Editor.hpp:18