light/modules/engine/include/engine/graphics/blender.hpp

52 lines
691 B
C++
Raw Normal View History

2022-03-08 21:19:19 +03:30
#pragma once
2025-07-05 13:28:41 +03:30
#include <engine/base/base.hpp>
2022-03-08 21:19:19 +03:30
namespace Light {
class SharedContext;
enum class BlendFactor : uint8_t
{
// constants
ZERO,
ONE,
// source
SRC_COLOR,
INVERSE_SRC_COLOR,
SRC_ALPHA,
INVERSE_SRC_ALPHA,
// destination
DST_COLOR,
INVERSE_DST_COLOR,
DST_ALPHA,
INVERSE_DST_ALPHA,
// source1
SRC1_COLOR,
INVERSE_SRC1_COLOR,
SRC1_ALPHA,
INVERSE_SRC1_ALPHA,
};
class Blender
{
public:
2025-07-06 16:52:50 +03:30
virtual ~Blender() = default;
static auto create(const Ref<SharedContext>& sharedContext) -> Scope<Blender>;
2022-03-08 21:19:19 +03:30
virtual void enable(BlendFactor srcFactor, BlendFactor dstFactor) = 0;
2025-07-06 14:02:50 +03:30
2025-07-05 16:07:51 +03:30
virtual void disable() = 0;
2022-03-08 21:19:19 +03:30
protected:
Blender() = default;
};
2022-05-26 10:52:16 +04:30
} // namespace Light