- }
- return Graphics::CullMode::NONE;
-}
-
-constexpr Graphics::BlendFactor ConvertBlendFactor(BlendFactor::Type blendFactor)
-{
- switch(blendFactor)
- {
- case BlendFactor::ZERO:
- return Graphics::BlendFactor::ZERO;
- case BlendFactor::ONE:
- return Graphics::BlendFactor::ONE;
- case BlendFactor::SRC_COLOR:
- return Graphics::BlendFactor::SRC_COLOR;
- case BlendFactor::ONE_MINUS_SRC_COLOR:
- return Graphics::BlendFactor::ONE_MINUS_SRC_COLOR;
- case BlendFactor::SRC_ALPHA:
- return Graphics::BlendFactor::SRC_ALPHA;
- case BlendFactor::ONE_MINUS_SRC_ALPHA:
- return Graphics::BlendFactor::ONE_MINUS_SRC_ALPHA;
- case BlendFactor::DST_ALPHA:
- return Graphics::BlendFactor::DST_ALPHA;
- case BlendFactor::ONE_MINUS_DST_ALPHA:
- return Graphics::BlendFactor::ONE_MINUS_DST_ALPHA;
- case BlendFactor::DST_COLOR:
- return Graphics::BlendFactor::DST_COLOR;
- case BlendFactor::ONE_MINUS_DST_COLOR:
- return Graphics::BlendFactor::ONE_MINUS_DST_COLOR;
- case BlendFactor::SRC_ALPHA_SATURATE:
- return Graphics::BlendFactor::SRC_ALPHA_SATURATE;
- case BlendFactor::CONSTANT_COLOR:
- return Graphics::BlendFactor::CONSTANT_COLOR;
- case BlendFactor::ONE_MINUS_CONSTANT_COLOR:
- return Graphics::BlendFactor::ONE_MINUS_CONSTANT_COLOR;
- case BlendFactor::CONSTANT_ALPHA:
- return Graphics::BlendFactor::CONSTANT_ALPHA;
- case BlendFactor::ONE_MINUS_CONSTANT_ALPHA:
- return Graphics::BlendFactor::ONE_MINUS_CONSTANT_ALPHA;
- }
- return Graphics::BlendFactor{};
-}
-
-constexpr Graphics::BlendOp ConvertBlendEquation(DevelBlendEquation::Type blendEquation)
-{
- switch(blendEquation)
- {
- case DevelBlendEquation::ADD:
- return Graphics::BlendOp::ADD;
- case DevelBlendEquation::SUBTRACT:
- return Graphics::BlendOp::SUBTRACT;
- case DevelBlendEquation::REVERSE_SUBTRACT:
- return Graphics::BlendOp::REVERSE_SUBTRACT;
- case DevelBlendEquation::COLOR:
- case DevelBlendEquation::COLOR_BURN:
- case DevelBlendEquation::COLOR_DODGE:
- case DevelBlendEquation::DARKEN:
- case DevelBlendEquation::DIFFERENCE:
- case DevelBlendEquation::EXCLUSION:
- case DevelBlendEquation::HARD_LIGHT:
- case DevelBlendEquation::HUE:
- case DevelBlendEquation::LIGHTEN:
- case DevelBlendEquation::LUMINOSITY:
- case DevelBlendEquation::MAX:
- case DevelBlendEquation::MIN:
- case DevelBlendEquation::MULTIPLY:
- case DevelBlendEquation::OVERLAY:
- case DevelBlendEquation::SATURATION:
- case DevelBlendEquation::SCREEN:
- case DevelBlendEquation::SOFT_LIGHT:
- return Graphics::BlendOp{};
- }
- return Graphics::BlendOp{};