Route default clear through renderer GL

This commit is contained in:
2026-06-03 05:50:36 +02:00
parent 103fe4fb12
commit 2a030318b1
6 changed files with 113 additions and 10 deletions

View File

@@ -148,6 +148,19 @@ struct OpenGlRuntimeInfoDispatch {
OpenGlStringQueryFn get_string = nullptr;
};
struct OpenGlDefaultClear {
std::array<float, 4> color {};
std::uint32_t mask = 0;
};
using OpenGlClearColorFn = void (*)(float r, float g, float b, float a) noexcept;
using OpenGlClearFn = void (*)(std::uint32_t mask) noexcept;
struct OpenGlClearDispatch {
OpenGlClearColorFn clear_color = nullptr;
OpenGlClearFn clear = nullptr;
};
[[nodiscard]] OpenGlCapabilities detect_opengl_capabilities(
std::span<const std::string_view> extensions,
OpenGlRuntime runtime) noexcept;
@@ -157,6 +170,8 @@ struct OpenGlRuntimeInfoDispatch {
[[nodiscard]] pp::foundation::Status apply_panopainter_initial_state(OpenGlStateDispatch dispatch) noexcept;
[[nodiscard]] pp::foundation::Result<OpenGlRuntimeInfo> query_opengl_runtime_info(
OpenGlRuntimeInfoDispatch dispatch) noexcept;
[[nodiscard]] OpenGlDefaultClear panopainter_default_clear() noexcept;
[[nodiscard]] pp::foundation::Status clear_panopainter_default_target(OpenGlClearDispatch dispatch) noexcept;
[[nodiscard]] std::uint32_t extension_count_query() noexcept;
[[nodiscard]] std::uint32_t extension_string_name() noexcept;