Cogs.Core
|
Encapsulates state for texture sampling in a state object. More...
#include <SamplerState.h>
Public Types | |
enum | AddressMode { Clamp , Wrap , Mirror , Border , AddressMode_Size } |
Addressing modes to use when sampling textures. More... | |
enum | FilterMode { MinMagMipPoint , MinMagMipLinear , ComparisonMinMagMipPoint , ComparisonMinMagMipLinear , FilterMode_Size } |
Filter modes to specify how texture data is treated when sampled. More... | |
enum | ComparisonFunction { Never , Less , Equal , LessEqual , Greater , NotEqual , GreaterEqual , Always , ComparisonFunction_Size } |
Comparison functions applied when sampling depth buffers using comparison filters. More... | |
Static Public Member Functions | |
static SamplerState & | DefaultState () |
Constructs a sampler state initialized with the default values. | |
Public Attributes | |
AddressMode | addressModeS |
Specifies the addressing mode along the S axis in texture coordinate space. | |
AddressMode | addressModeT |
Specifies the addressing mode along the T axis in texture coordinate space. | |
AddressMode | addressModeW |
Specifies the addressing mode along the W axis in texture coordinate space. | |
FilterMode | filter |
Specifies the filter to use for texture sampling. | |
ComparisonFunction | comparisonFunction |
Specifies the comparison function to use when applying a comparison sampler. | |
unsigned int | maxAnisotropy |
Specifies the maximum number of anisotropic samples to use when sampling a texture. | |
float | borderColor [4] |
Encapsulates state for texture sampling in a state object.
Sampler state can be used to control how textures are sampled, e.g if texture coordinates wrap around when going outside [0, 1] range, if mipmaps are used etc.
Definition at line 11 of file SamplerState.h.
Addressing modes to use when sampling textures.
Definition at line 14 of file SamplerState.h.
Comparison functions applied when sampling depth buffers using comparison filters.
Definition at line 47 of file SamplerState.h.
Filter modes to specify how texture data is treated when sampled.
Definition at line 30 of file SamplerState.h.
|
inlinestatic |
Constructs a sampler state initialized with the default values.
Definition at line 85 of file SamplerState.h.
References MinMagMipLinear, and Wrap.
Referenced by Cogs::Core::Volumetric::OctRenderer::initialize(), and Cogs::ContextGL20::setSamplerState().
AddressMode Cogs::SamplerState::addressModeS |
Specifies the addressing mode along the S axis in texture coordinate space.
Definition at line 63 of file SamplerState.h.
Referenced by Cogs::Core::Volumetric::OctRenderer::initialize(), Cogs::TexturesGLES30::loadSamplerState(), Cogs::TexturesD3D11::loadSamplerState(), Cogs::TexturesD3D12::loadSamplerState(), Cogs::TexturesGL20::loadSamplerState(), Cogs::TexturesVK::loadSamplerState(), Cogs::TexturesWebGPU::loadSamplerState(), and Cogs::Core::Renderer::render().
AddressMode Cogs::SamplerState::addressModeT |
Specifies the addressing mode along the T axis in texture coordinate space.
Definition at line 65 of file SamplerState.h.
Referenced by Cogs::Core::Volumetric::OctRenderer::initialize(), Cogs::TexturesGLES30::loadSamplerState(), Cogs::TexturesD3D11::loadSamplerState(), Cogs::TexturesD3D12::loadSamplerState(), Cogs::TexturesGL20::loadSamplerState(), Cogs::TexturesVK::loadSamplerState(), and Cogs::TexturesWebGPU::loadSamplerState().
AddressMode Cogs::SamplerState::addressModeW |
Specifies the addressing mode along the W axis in texture coordinate space.
Definition at line 67 of file SamplerState.h.
Referenced by Cogs::Core::Volumetric::OctRenderer::initialize(), Cogs::TexturesGLES30::loadSamplerState(), Cogs::TexturesD3D11::loadSamplerState(), Cogs::TexturesD3D12::loadSamplerState(), Cogs::TexturesGL20::loadSamplerState(), Cogs::TexturesVK::loadSamplerState(), and Cogs::TexturesWebGPU::loadSamplerState().
float Cogs::SamplerState::borderColor[4] |
Specifies the border color to apply if the addressing mode is Border and texture coordinates are outside the [0, 1] range.
Definition at line 80 of file SamplerState.h.
Referenced by Cogs::TexturesD3D11::loadSamplerState(), Cogs::TexturesD3D12::loadSamplerState(), Cogs::TexturesGL20::loadSamplerState(), and Cogs::TexturesVK::loadSamplerState().
ComparisonFunction Cogs::SamplerState::comparisonFunction |
Specifies the comparison function to use when applying a comparison sampler.
Definition at line 73 of file SamplerState.h.
Referenced by Cogs::TexturesGLES30::loadSamplerState(), Cogs::TexturesD3D11::loadSamplerState(), Cogs::TexturesD3D12::loadSamplerState(), Cogs::TexturesGL20::loadSamplerState(), Cogs::TexturesVK::loadSamplerState(), and Cogs::TexturesWebGPU::loadSamplerState().
FilterMode Cogs::SamplerState::filter |
Specifies the filter to use for texture sampling.
Definition at line 70 of file SamplerState.h.
Referenced by Cogs::Core::Volumetric::OctRenderer::initialize(), Cogs::TexturesGLES30::loadSamplerState(), Cogs::TexturesD3D11::loadSamplerState(), Cogs::TexturesD3D12::loadSamplerState(), Cogs::TexturesGL20::loadSamplerState(), Cogs::TexturesVK::loadSamplerState(), and Cogs::TexturesWebGPU::loadSamplerState().
unsigned int Cogs::SamplerState::maxAnisotropy |
Specifies the maximum number of anisotropic samples to use when sampling a texture.
Definition at line 76 of file SamplerState.h.
Referenced by Cogs::TexturesGLES30::loadSamplerState(), Cogs::TexturesD3D11::loadSamplerState(), Cogs::TexturesD3D12::loadSamplerState(), Cogs::TexturesGL20::loadSamplerState(), Cogs::TexturesVK::loadSamplerState(), and Cogs::TexturesWebGPU::loadSamplerState().