Map renderer blend state to OpenGL
This commit is contained in:
@@ -46,6 +46,18 @@ struct OpenGlColorWriteMask {
|
||||
std::uint8_t a = 0;
|
||||
};
|
||||
|
||||
struct OpenGlBlendState {
|
||||
std::uint8_t enabled = 0;
|
||||
std::uint32_t source_color_factor = 0;
|
||||
std::uint32_t destination_color_factor = 0;
|
||||
std::uint32_t color_equation = 0;
|
||||
std::uint32_t source_alpha_factor = 0;
|
||||
std::uint32_t destination_alpha_factor = 0;
|
||||
std::uint32_t alpha_equation = 0;
|
||||
OpenGlColorWriteMask color_write_mask;
|
||||
bool supported = false;
|
||||
};
|
||||
|
||||
struct OpenGlDepthState {
|
||||
std::uint8_t test_enabled = 0;
|
||||
std::uint8_t write_enabled = 0;
|
||||
@@ -169,6 +181,8 @@ struct OpenGlWindowsWglContextConfig {
|
||||
pp::renderer::BlendFactor factor) noexcept;
|
||||
[[nodiscard]] OpenGlEnumMapping blend_equation_for_renderer_op(
|
||||
pp::renderer::BlendOp op) noexcept;
|
||||
[[nodiscard]] OpenGlBlendState blend_state_for_renderer_blend_state(
|
||||
pp::renderer::BlendState state) noexcept;
|
||||
[[nodiscard]] std::uint32_t rgba8_internal_format() noexcept;
|
||||
[[nodiscard]] std::uint32_t rgba16f_internal_format() noexcept;
|
||||
[[nodiscard]] std::uint32_t rgba32f_internal_format() noexcept;
|
||||
|
||||
Reference in New Issue
Block a user