Apply startup GL state through renderer GL
This commit is contained in:
@@ -124,12 +124,24 @@ struct OpenGlInitialState {
|
||||
std::uint32_t alpha_equation = 0;
|
||||
};
|
||||
|
||||
using OpenGlCapabilityFn = void (*)(std::uint32_t state) noexcept;
|
||||
using OpenGlBlendFuncFn = void (*)(std::uint32_t source_factor, std::uint32_t destination_factor) noexcept;
|
||||
using OpenGlBlendEquationSeparateFn = void (*)(std::uint32_t color_equation, std::uint32_t alpha_equation) noexcept;
|
||||
|
||||
struct OpenGlStateDispatch {
|
||||
OpenGlCapabilityFn enable = nullptr;
|
||||
OpenGlCapabilityFn disable = nullptr;
|
||||
OpenGlBlendFuncFn blend_func = nullptr;
|
||||
OpenGlBlendEquationSeparateFn blend_equation_separate = nullptr;
|
||||
};
|
||||
|
||||
[[nodiscard]] OpenGlCapabilities detect_opengl_capabilities(
|
||||
std::span<const std::string_view> extensions,
|
||||
OpenGlRuntime runtime) noexcept;
|
||||
[[nodiscard]] pp::renderer::RenderDeviceFeatures render_device_features(
|
||||
OpenGlCapabilities capabilities) noexcept;
|
||||
[[nodiscard]] OpenGlInitialState panopainter_initial_state() noexcept;
|
||||
[[nodiscard]] pp::foundation::Status apply_panopainter_initial_state(OpenGlStateDispatch dispatch) noexcept;
|
||||
|
||||
[[nodiscard]] std::uint32_t extension_count_query() noexcept;
|
||||
[[nodiscard]] std::uint32_t extension_string_name() noexcept;
|
||||
|
||||
Reference in New Issue
Block a user