107 struct hash<
Cogs::SamplerState>
111 static std::hash<size_t> hashFunction;
113 size_t result = hashFunction(
static_cast<size_t>(state.
addressModeS));
114 result = result * 16777619 + hashFunction(
static_cast<size_t>(state.
addressModeT));
115 result = result * 16777619 + hashFunction(
static_cast<size_t>(state.
addressModeW));
116 result = result * 16777619 + hashFunction(
static_cast<size_t>(state.
filter));
117 result = result * 16777619 + hashFunction(
static_cast<size_t>(state.
comparisonFunction));
118 result = result * 16777619 + hashFunction(
static_cast<size_t>(state.
maxAnisotropy));
128 struct equal_to<
Cogs::SamplerState>
Encapsulates state for texture sampling in a state object.
Definition: SamplerState.h:12
ComparisonFunction comparisonFunction
Specifies the comparison function to use when applying a comparison sampler.
Definition: SamplerState.h:73
unsigned int maxAnisotropy
Specifies the maximum number of anisotropic samples to use when sampling a texture.
Definition: SamplerState.h:76
static SamplerState & DefaultState()
Constructs a sampler state initialized with the default values.
Definition: SamplerState.h:85
AddressMode addressModeW
Specifies the addressing mode along the W axis in texture coordinate space.
Definition: SamplerState.h:67
ComparisonFunction
Comparison functions applied when sampling depth buffers using comparison filters.
Definition: SamplerState.h:48
@ LessEqual
Definition: SamplerState.h:52
@ Never
Definition: SamplerState.h:49
@ NotEqual
Definition: SamplerState.h:54
@ GreaterEqual
Definition: SamplerState.h:55
@ ComparisonFunction_Size
Definition: SamplerState.h:59
@ Equal
Definition: SamplerState.h:51
@ Greater
Definition: SamplerState.h:53
@ Less
Definition: SamplerState.h:50
@ Always
Definition: SamplerState.h:56
AddressMode addressModeS
Specifies the addressing mode along the S axis in texture coordinate space.
Definition: SamplerState.h:63
AddressMode
Addressing modes to use when sampling textures.
Definition: SamplerState.h:15
@ AddressMode_Size
Definition: SamplerState.h:26
@ Clamp
Texture coordinates are clamped to the [0, 1] range.
Definition: SamplerState.h:17
@ Border
Texture color is set to the border color when outside [0, 1] range.
Definition: SamplerState.h:23
@ Wrap
Texture coordinates automatically wrap around to [0, 1] range.
Definition: SamplerState.h:19
@ Mirror
Texture coordinates are mirrored when outside [0, 1] range.
Definition: SamplerState.h:21
float borderColor[4]
Definition: SamplerState.h:80
FilterMode
Filter modes to specify how texture data is treated when sampled.
Definition: SamplerState.h:31
@ ComparisonMinMagMipPoint
Comparison filter for depth sample comparisons using point sampling.
Definition: SamplerState.h:38
@ ComparisonMinMagMipLinear
Comparison filter for depth sample comparisons using linear interpolation sampling.
Definition: SamplerState.h:40
@ FilterMode_Size
Definition: SamplerState.h:43
@ MinMagMipPoint
Point sampling for both minification and magnification.
Definition: SamplerState.h:33
@ MinMagMipLinear
Linear sampling for both minification and magnification.
Definition: SamplerState.h:35
FilterMode filter
Specifies the filter to use for texture sampling.
Definition: SamplerState.h:70
AddressMode addressModeT
Specifies the addressing mode along the T axis in texture coordinate space.
Definition: SamplerState.h:65
bool operator()(const Cogs::SamplerState &lhs, const Cogs::SamplerState &rhs) const
Definition: SamplerState.h:130
std::size_t operator()(const Cogs::SamplerState &state) const
Definition: SamplerState.h:109