light/modules/renderer/include/renderer/blender.hpp
light7734 f2c692a118
All checks were successful
continuous-integration/drone/push Build is passing
style: apply clang-format v20
2025-07-11 14:05:59 +03:30

50 lines
654 B
C++

#pragma once
namespace lt {
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:
virtual ~Blender() = default;
static auto create(const Ref<SharedContext> &sharedContext) -> Scope<Blender>;
virtual void enable(BlendFactor srcFactor, BlendFactor dstFactor) = 0;
virtual void disable() = 0;
protected:
Blender() = default;
};
} // namespace lt