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

ブレンドステート More...

#include <BlendState.hpp>

Public Types

using storage_type = uint32
 

Public Member Functions

constexpr SIV3D_NODISCARD_CXX20 BlendState (bool _enable=true, Blend _src=Blend::SrcAlpha, Blend _dst=Blend::InvSrcAlpha, BlendOp _op=BlendOp::Add, Blend _srcAlpha=Blend::Zero, Blend _dstAlpha=Blend::One, BlendOp _opAlpha=BlendOp::Add, bool _alphaToCoverageEnable=false, bool _writeR=true, bool _writeG=true, bool _writeB=true, bool _writeA=true) noexcept
 
constexpr SIV3D_NODISCARD_CXX20 BlendState (Predefined predefined) noexcept
 
storage_type asValue () const noexcept
 
bool operator== (const BlendState &other) const noexcept
 
bool operator!= (const BlendState &other) const noexcept
 

Public Attributes

bool enable: 1 = true
 
bool writeR: 1 = true
 
bool writeG: 1 = true
 
Blend src: 5 = Blend::SrcAlpha
 
Blend dst: 5 = Blend::InvSrcAlpha
 
BlendOp op: 3 = BlendOp::Add
 
bool alphaToCoverageEnable: 1 = false
 
bool writeB: 1 = true
 
bool writeA: 1 = true
 
Blend srcAlpha: 5 = Blend::Zero
 
Blend dstAlpha: 5 = Blend::One
 
BlendOp opAlpha: 3 = BlendOp::Add
 

Static Public Attributes

static constexpr Predefined NonPremultiplied = Predefined::NonPremultiplied
 デフォルトのブレンド More...
 
static constexpr Predefined Premultiplied = Predefined::Premultiplied
 乗算済みアルファブレンド More...
 
static constexpr Predefined Opaque = Predefined::Opaque
 不透明 More...
 
static constexpr Predefined Additive = Predefined::Additive
 加算ブレンド More...
 
static constexpr Predefined AdditiveRGB = Predefined::AdditiveRGB
 加算ブレンド (RGB) More...
 
static constexpr Predefined Subtractive = Predefined::Subtractive
 減算ブレンド More...
 
static constexpr Predefined Multiplicative = Predefined::Multiplicative
 乗算ブレンド More...
 
static constexpr Predefined Multiplicative2X = Predefined::Multiplicative2X
 2X 乗算ブレンド More...
 
static constexpr Predefined OpaqueAlphaToCoverage = Predefined::OpaqueAlphaToCoverage
 Alpha to Coverage. More...
 
static constexpr Predefined MaxAlpha = Predefined::MaxAlpha
 アルファの最大値のみ更新 More...
 
static constexpr Predefined Default2D = Predefined::Default2D
 デフォルトのブレンド More...
 
static constexpr Predefined Default3D = Predefined::Default3D
 デフォルトのブレンド More...
 

Detailed Description

ブレンドステート

Member Typedef Documentation

◆ storage_type

Constructor & Destructor Documentation

◆ BlendState() [1/2]

constexpr SIV3D_NODISCARD_CXX20 s3d::BlendState::BlendState ( bool  _enable = true,
Blend  _src = Blend::SrcAlpha,
Blend  _dst = Blend::InvSrcAlpha,
BlendOp  _op = BlendOp::Add,
Blend  _srcAlpha = Blend::Zero,
Blend  _dstAlpha = Blend::One,
BlendOp  _opAlpha = BlendOp::Add,
bool  _alphaToCoverageEnable = false,
bool  _writeR = true,
bool  _writeG = true,
bool  _writeB = true,
bool  _writeA = true 
)
explicitconstexprnoexcept

◆ BlendState() [2/2]

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

Member Function Documentation

◆ asValue()

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

◆ operator!=()

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

◆ operator==()

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

Member Data Documentation

◆ Additive

constexpr Predefined s3d::BlendState::Additive = Predefined::Additive
staticconstexpr

◆ AdditiveRGB

constexpr Predefined s3d::BlendState::AdditiveRGB = Predefined::AdditiveRGB
staticconstexpr

加算ブレンド (RGB)

Remarks
BlendState{ true, Blend::One, Blend::One, BlendOp::Add, Blend::Zero, Blend::One, BlendOp::Add }

◆ alphaToCoverageEnable

bool s3d::BlendState::alphaToCoverageEnable

◆ Default2D

constexpr Predefined s3d::BlendState::Default2D = Predefined::Default2D
staticconstexpr

デフォルトのブレンド

Remarks
BlendState{ true }

◆ Default3D

constexpr Predefined s3d::BlendState::Default3D = Predefined::Default3D
staticconstexpr

デフォルトのブレンド

Remarks
BlendState{ false }

◆ dst

Blend s3d::BlendState::dst

◆ dstAlpha

Blend s3d::BlendState::dstAlpha

◆ enable

bool s3d::BlendState::enable

◆ MaxAlpha

constexpr Predefined s3d::BlendState::MaxAlpha = Predefined::MaxAlpha
staticconstexpr

アルファの最大値のみ更新

Remarks
BlendState{ true, Blend::Zero, Blend::One, BlendOp::Add, Blend::SrcAlpha, Blend::DestAlpha, BlendOp::Max }

◆ Multiplicative

constexpr Predefined s3d::BlendState::Multiplicative = Predefined::Multiplicative
staticconstexpr

◆ Multiplicative2X

constexpr Predefined s3d::BlendState::Multiplicative2X = Predefined::Multiplicative2X
staticconstexpr

◆ NonPremultiplied

constexpr Predefined s3d::BlendState::NonPremultiplied = Predefined::NonPremultiplied
staticconstexpr

デフォルトのブレンド

Remarks
BlendState{ true, Blend::SrcAlpha, Blend::InvSrcAlpha, BlendOp::Add, Blend::Zero, Blend::One, BlendOp::Add }

◆ op

BlendOp s3d::BlendState::op

◆ opAlpha

BlendOp s3d::BlendState::opAlpha

◆ Opaque

constexpr Predefined s3d::BlendState::Opaque = Predefined::Opaque
staticconstexpr

不透明

Remarks
BlendState{ false }

◆ OpaqueAlphaToCoverage

constexpr Predefined s3d::BlendState::OpaqueAlphaToCoverage = Predefined::OpaqueAlphaToCoverage
staticconstexpr

Alpha to Coverage.

Remarks
BlendState{ false, .alphaToCoverageEnable = true }

◆ Premultiplied

constexpr Predefined s3d::BlendState::Premultiplied = Predefined::Premultiplied
staticconstexpr

乗算済みアルファブレンド

Remarks
BlendState{ true, Blend::One, Blend::InvSrcAlpha, BlendOp::Add, Blend::Zero, Blend::One, BlendOp::Add }

◆ src

Blend s3d::BlendState::src

◆ srcAlpha

Blend s3d::BlendState::srcAlpha

◆ Subtractive

constexpr Predefined s3d::BlendState::Subtractive = Predefined::Subtractive
staticconstexpr

◆ writeA

bool s3d::BlendState::writeA

◆ writeB

bool s3d::BlendState::writeB

◆ writeG

bool s3d::BlendState::writeG

◆ writeR

bool s3d::BlendState::writeR

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