Map renderer depth state to OpenGL

This commit is contained in:
2026-06-02 20:23:49 +02:00
parent 9b6c5b0849
commit 36f9e73dd4
5 changed files with 61 additions and 2 deletions

View File

@@ -46,6 +46,13 @@ struct OpenGlColorWriteMask {
std::uint8_t a = 0;
};
struct OpenGlDepthState {
std::uint8_t test_enabled = 0;
std::uint8_t write_enabled = 0;
std::uint32_t compare_function = 0;
bool supported = false;
};
struct OpenGlReadbackFormat {
std::uint32_t pixel_format = 0;
std::uint32_t component_type = 0;
@@ -149,6 +156,8 @@ struct OpenGlWindowsWglContextConfig {
[[nodiscard]] std::uint32_t depth_test_state() noexcept;
[[nodiscard]] OpenGlEnumMapping compare_function_for_renderer_compare_op(
pp::renderer::CompareOp op) noexcept;
[[nodiscard]] OpenGlDepthState depth_state_for_renderer_depth_state(
pp::renderer::DepthState state) noexcept;
[[nodiscard]] std::uint32_t scissor_test_state() noexcept;
[[nodiscard]] std::uint32_t program_point_size_state() noexcept;
[[nodiscard]] std::uint32_t line_smooth_state() noexcept;