FastEngine 0.9.3
A multiplayer oriented 2D engine made with Vulkan.
Loading...
Searching...
No Matches
C_blendMode.hpp File Reference
#include "volk.h"

Go to the source code of this file.

Classes

struct  fge::vulkan::BlendMode
 This is a simple abstraction class for VkBlendFactor, VkBlendOp. More...
 

Functions

constexpr BlendMode fge::vulkan::BlendAlpha (VK_BLEND_FACTOR_SRC_ALPHA, VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA, VK_BLEND_OP_ADD, VK_BLEND_FACTOR_ONE, VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA, VK_BLEND_OP_ADD)
 Blend source and dest according to dest alpha.
 
constexpr BlendMode fge::vulkan::BlendAdd (VK_BLEND_FACTOR_SRC_ALPHA, VK_BLEND_FACTOR_ONE, VK_BLEND_OP_ADD, VK_BLEND_FACTOR_ONE, VK_BLEND_FACTOR_ONE, VK_BLEND_OP_ADD)
 Add source to dest.
 
constexpr BlendMode fge::vulkan::BlendMultiply (VK_BLEND_FACTOR_DST_COLOR, VK_BLEND_FACTOR_ZERO, VK_BLEND_OP_ADD)
 Multiply source and dest.
 
constexpr BlendMode fge::vulkan::BlendMin (VK_BLEND_FACTOR_ONE, VK_BLEND_FACTOR_ONE, VK_BLEND_OP_MIN)
 Take minimum between source and dest.
 
constexpr BlendMode fge::vulkan::BlendMax (VK_BLEND_FACTOR_ONE, VK_BLEND_FACTOR_ONE, VK_BLEND_OP_MAX)
 Take maximum between source and dest.
 
constexpr BlendMode fge::vulkan::BlendNone (VK_BLEND_FACTOR_ONE, VK_BLEND_FACTOR_ZERO, VK_BLEND_OP_ADD)
 Overwrite dest with source.
 

Detailed Description

A file containing an abstraction for vulkan blendmode and basic default blendmode.

Function Documentation

◆ BlendAdd()

BlendMode fge::vulkan::BlendAdd ( VK_BLEND_FACTOR_SRC_ALPHA ,
VK_BLEND_FACTOR_ONE ,
VK_BLEND_OP_ADD ,
VK_BLEND_FACTOR_ONE ,
VK_BLEND_FACTOR_ONE ,
VK_BLEND_OP_ADD  )
inlineconstexpr

Add source to dest.

◆ BlendAlpha()

BlendMode fge::vulkan::BlendAlpha ( VK_BLEND_FACTOR_SRC_ALPHA ,
VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA ,
VK_BLEND_OP_ADD ,
VK_BLEND_FACTOR_ONE ,
VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA ,
VK_BLEND_OP_ADD  )
inlineconstexpr

Blend source and dest according to dest alpha.

◆ BlendMax()

BlendMode fge::vulkan::BlendMax ( VK_BLEND_FACTOR_ONE ,
VK_BLEND_FACTOR_ONE ,
VK_BLEND_OP_MAX  )
inlineconstexpr

Take maximum between source and dest.

◆ BlendMin()

BlendMode fge::vulkan::BlendMin ( VK_BLEND_FACTOR_ONE ,
VK_BLEND_FACTOR_ONE ,
VK_BLEND_OP_MIN  )
inlineconstexpr

Take minimum between source and dest.

◆ BlendMultiply()

BlendMode fge::vulkan::BlendMultiply ( VK_BLEND_FACTOR_DST_COLOR ,
VK_BLEND_FACTOR_ZERO ,
VK_BLEND_OP_ADD  )
inlineconstexpr

Multiply source and dest.

◆ BlendNone()

BlendMode fge::vulkan::BlendNone ( VK_BLEND_FACTOR_ONE ,
VK_BLEND_FACTOR_ZERO ,
VK_BLEND_OP_ADD  )
inlineconstexpr

Overwrite dest with source.