OpenSiv3D  v0.6.5
C++20 framework for creative coding
s3d::SamplerState Struct Reference

サンプラーステート More...

#include <SamplerState.hpp>

Public Types

using storage_type = std::array< uint32, 6 >
 

Public Member Functions

constexpr SIV3D_NODISCARD_CXX20 SamplerState (TextureAddressMode address, TextureFilter filter, uint8 _maxAnisotropy=1, float _lodBias=0.0f, Float4 _borderColor=Float4{ 0, 0, 0, 0 }) noexcept
 
constexpr SIV3D_NODISCARD_CXX20 SamplerState (TextureAddressMode _addressU=TextureAddressMode::Clamp, TextureAddressMode _addressV=TextureAddressMode::Clamp, TextureAddressMode _addressW=TextureAddressMode::Clamp, TextureFilter _min=TextureFilter::Linear, TextureFilter _mag=TextureFilter::Linear, TextureFilter _mip=TextureFilter::Linear, uint8 _maxAnisotropy=1, float _lodBias=0.0f, Float4 _borderColor=Float4{ 0, 0, 0, 0 }) noexcept
 
constexpr SIV3D_NODISCARD_CXX20 SamplerState (Predefined predefined) noexcept
 
storage_type asValue () const noexcept
 
bool operator== (const SamplerState &other) const noexcept
 
bool operator!= (const SamplerState &other) const noexcept
 

Public Attributes

TextureAddressMode addressU: 4 = TextureAddressMode::Clamp
 
TextureAddressMode addressV: 4 = TextureAddressMode::Clamp
 
TextureAddressMode addressW: 4 = TextureAddressMode::Clamp
 
TextureFilter min: 1 = TextureFilter::Linear
 
TextureFilter mag: 1 = TextureFilter::Linear
 
TextureFilter mip: 1 = TextureFilter::Linear
 
uint8 maxAnisotropy = 1
 
float lodBias = 0.0f
 
Float4 borderColor = Float4{ 0, 0, 0, 0 }
 

Static Public Attributes

static constexpr uint32 MaxSamplerCount = 8
 
static constexpr uint32 DefaultMaxAnisotropy = 4
 
static constexpr Predefined RepeatNearest = Predefined::RepeatNearest
 
static constexpr Predefined RepeatLinear = Predefined::RepeatLinear
 
static constexpr Predefined RepeatAniso = Predefined::RepeatAniso
 
static constexpr Predefined MirrorNearest = Predefined::MirrorNearest
 
static constexpr Predefined MirrorLinear = Predefined::MirrorLinear
 
static constexpr Predefined MirrorAniso = Predefined::MirrorAniso
 
static constexpr Predefined ClampNearest = Predefined::ClampNearest
 
static constexpr Predefined ClampLinear = Predefined::ClampLinear
 
static constexpr Predefined ClampAniso = Predefined::ClampAniso
 
static constexpr Predefined BorderNearest = Predefined::BorderNearest
 
static constexpr Predefined BorderLinear = Predefined::BorderLinear
 
static constexpr Predefined BorderAniso = Predefined::BorderAniso
 
static constexpr Predefined Default2D = Predefined::Default2D
 2D 描画時のデフォルト More...
 
static constexpr Predefined Default3D = Predefined::Default3D
 3D 描画時のデフォルト More...
 

Detailed Description

サンプラーステート

Member Typedef Documentation

◆ storage_type

using s3d::SamplerState::storage_type = std::array<uint32, 6>

Constructor & Destructor Documentation

◆ SamplerState() [1/3]

constexpr SIV3D_NODISCARD_CXX20 s3d::SamplerState::SamplerState ( TextureAddressMode  address,
TextureFilter  filter,
uint8  _maxAnisotropy = 1,
float  _lodBias = 0.0f,
Float4  _borderColor = Float4{ 0, 0, 0, 0 } 
)
explicitconstexprnoexcept

◆ SamplerState() [2/3]

constexpr SIV3D_NODISCARD_CXX20 s3d::SamplerState::SamplerState ( TextureAddressMode  _addressU = TextureAddressMode::Clamp,
TextureAddressMode  _addressV = TextureAddressMode::Clamp,
TextureAddressMode  _addressW = TextureAddressMode::Clamp,
TextureFilter  _min = TextureFilter::Linear,
TextureFilter  _mag = TextureFilter::Linear,
TextureFilter  _mip = TextureFilter::Linear,
uint8  _maxAnisotropy = 1,
float  _lodBias = 0.0f,
Float4  _borderColor = Float4{ 0, 0, 0, 0 } 
)
explicitconstexprnoexcept

◆ SamplerState() [3/3]

constexpr SIV3D_NODISCARD_CXX20 s3d::SamplerState::SamplerState ( Predefined  predefined)
constexprnoexcept

Member Function Documentation

◆ asValue()

storage_type s3d::SamplerState::asValue ( ) const
noexcept

◆ operator!=()

bool s3d::SamplerState::operator!= ( const SamplerState other) const
noexcept

◆ operator==()

bool s3d::SamplerState::operator== ( const SamplerState other) const
noexcept

Member Data Documentation

◆ addressU

TextureAddressMode s3d::SamplerState::addressU

◆ addressV

TextureAddressMode s3d::SamplerState::addressV

◆ addressW

TextureAddressMode s3d::SamplerState::addressW

◆ BorderAniso

constexpr Predefined s3d::SamplerState::BorderAniso = Predefined::BorderAniso
staticconstexpr

◆ borderColor

Float4 s3d::SamplerState::borderColor = Float4{ 0, 0, 0, 0 }

◆ BorderLinear

constexpr Predefined s3d::SamplerState::BorderLinear = Predefined::BorderLinear
staticconstexpr

◆ BorderNearest

constexpr Predefined s3d::SamplerState::BorderNearest = Predefined::BorderNearest
staticconstexpr

◆ ClampAniso

constexpr Predefined s3d::SamplerState::ClampAniso = Predefined::ClampAniso
staticconstexpr

◆ ClampLinear

constexpr Predefined s3d::SamplerState::ClampLinear = Predefined::ClampLinear
staticconstexpr

◆ ClampNearest

constexpr Predefined s3d::SamplerState::ClampNearest = Predefined::ClampNearest
staticconstexpr

◆ Default2D

constexpr Predefined s3d::SamplerState::Default2D = Predefined::Default2D
staticconstexpr

2D 描画時のデフォルト

◆ Default3D

constexpr Predefined s3d::SamplerState::Default3D = Predefined::Default3D
staticconstexpr

3D 描画時のデフォルト

◆ DefaultMaxAnisotropy

constexpr uint32 s3d::SamplerState::DefaultMaxAnisotropy = 4
staticconstexpr

◆ lodBias

float s3d::SamplerState::lodBias = 0.0f

◆ mag

TextureFilter s3d::SamplerState::mag

◆ maxAnisotropy

uint8 s3d::SamplerState::maxAnisotropy = 1

◆ MaxSamplerCount

constexpr uint32 s3d::SamplerState::MaxSamplerCount = 8
staticconstexpr

◆ min

TextureFilter s3d::SamplerState::min

◆ mip

TextureFilter s3d::SamplerState::mip

◆ MirrorAniso

constexpr Predefined s3d::SamplerState::MirrorAniso = Predefined::MirrorAniso
staticconstexpr

◆ MirrorLinear

constexpr Predefined s3d::SamplerState::MirrorLinear = Predefined::MirrorLinear
staticconstexpr

◆ MirrorNearest

constexpr Predefined s3d::SamplerState::MirrorNearest = Predefined::MirrorNearest
staticconstexpr

◆ RepeatAniso

constexpr Predefined s3d::SamplerState::RepeatAniso = Predefined::RepeatAniso
staticconstexpr

◆ RepeatLinear

constexpr Predefined s3d::SamplerState::RepeatLinear = Predefined::RepeatLinear
staticconstexpr

◆ RepeatNearest

constexpr Predefined s3d::SamplerState::RepeatNearest = Predefined::RepeatNearest
staticconstexpr

The documentation for this struct was generated from the following file: