SPARK  0.1.0
A general purpose game engine written in C++.
Loading...
Searching...
No Matches
Sampler.h
1#pragma once
2
3#include "spark/render/Export.h"
4#include "spark/render/StateResource.h"
5
6#include <array>
7
8namespace spark::render
9{
13 enum class FilterMode
14 {
16 Nearest = 0x00000001,
17
19 Linear = 0x00000002
20 };
21
25 enum class MipMapMode
26 {
28 Nearest = 0x00000001,
29
31 Linear = 0x00000002
32 };
33
37 enum class BorderMode
38 {
40 Repeat = 0x00000001,
41
43 RepeatMirrored = 0x00010001,
44
46 ClampToEdge = 0x00000002,
47
49 ClampToEdgeMirrored = 0x00010002,
50
52 ClampToBorder = 0x00000003,
53 };
54
58 class SPARK_RENDER_EXPORT ISampler : public virtual IStateResource
59 {
60 public:
61 ~ISampler() noexcept override = default;
62
67 [[nodiscard]] virtual FilterMode minifyingFilter() const noexcept = 0;
68
73 [[nodiscard]] virtual FilterMode magnifyingFilter() const noexcept = 0;
74
81 [[nodiscard]] virtual std::array<BorderMode, 3> borderMode() const noexcept = 0;
82
89 [[nodiscard]] virtual float anisotropy() const noexcept = 0;
90
95 [[nodiscard]] virtual MipMapMode mipMapMode() const noexcept = 0;
96
101 [[nodiscard]] virtual float mipMapBias() const noexcept = 0;
102
107 [[nodiscard]] virtual float minLod() const noexcept = 0;
108
113 [[nodiscard]] virtual float maxLod() const noexcept = 0;
114 };
115}
Describes a texture sampler.
Definition Sampler.h:59
virtual FilterMode minifyingFilter() const noexcept=0
Gets the filter mode for minifying lookups.
Interface for a state resource.
Definition StateResource.h:14