1#pragma once
2
3#include <nn/gfx/detail/gfx_DataContainer.h>
4#include <nn/gfx/gfx_Enum.h>
5#include <nn/gfx/gfx_SamplerInfoData.h>
6
7namespace nn::gfx {
8
9class SamplerInfo : public detail::DataContainer<SamplerInfoData> {
10public:
11 SamplerInfo() {}
12
13 void SetDefault();
14
15 void SetFilterMode(FilterMode value) { filterMode = value; }
16 void SetAddressU(TextureAddressMode value) { addressU = value; }
17 void SetAddressV(TextureAddressMode value) { addressV = value; }
18 void SetAddressW(TextureAddressMode value) { addressW = value; }
19 void SetComparisonFunction(ComparisonFunction value) { comparisonFunction = value; }
20 void SetBorderColorType(TextureBorderColorType value) { borderColorType = value; }
21 void SetMaxAnisotropy(int value) { maxAnisotropy = value; }
22 void SetMinLod(float value) { minLod = value; }
23 void SetMaxLod(float value) { maxLod = value; }
24 void SetLodBias(float value) { lodBias = value; }
25
26 FilterMode GetFilterMode() const { return static_cast<FilterMode>(filterMode); }
27 TextureAddressMode GetAddressU() const { return static_cast<TextureAddressMode>(addressU); }
28 TextureAddressMode GetAddressV() const { return static_cast<TextureAddressMode>(addressV); }
29 TextureAddressMode GetAddressW() const { return static_cast<TextureAddressMode>(addressW); }
30
31 ComparisonFunction GetComparisonFunction() const {
32 return static_cast<ComparisonFunction>(comparisonFunction);
33 }
34
35 TextureBorderColorType GetBorderColorType() const {
36 return static_cast<TextureBorderColorType>(borderColorType);
37 }
38
39 int GetMaxAnisotropy() const { return maxAnisotropy; }
40 float GetMinLod() const { return minLod; }
41 float GetMaxLod() const { return maxLod; }
42 float GetLodBias() const { return lodBias; }
43};
44
45} // namespace nn::gfx