Route RTT framebuffer binding through renderer GL
This commit is contained in:
@@ -167,6 +167,11 @@ struct OpenGlFramebufferReadback {
|
||||
void* pixels = nullptr;
|
||||
};
|
||||
|
||||
struct OpenGlFramebufferBindingState {
|
||||
std::int32_t draw_framebuffer = 0;
|
||||
std::int32_t read_framebuffer = 0;
|
||||
};
|
||||
|
||||
struct OpenGlWindowsWglContextConfig {
|
||||
std::array<std::int32_t, 9> context_attributes {};
|
||||
std::array<std::int32_t, 15> pixel_format_attributes {};
|
||||
@@ -381,6 +386,15 @@ struct OpenGlFramebufferReadbackDispatch {
|
||||
OpenGlReadPixelsFn read_pixels = nullptr;
|
||||
};
|
||||
|
||||
struct OpenGlFramebufferBindDispatch {
|
||||
OpenGlGetIntegerFn get_integer = nullptr;
|
||||
OpenGlBindFramebufferFn bind_framebuffer = nullptr;
|
||||
};
|
||||
|
||||
struct OpenGlFramebufferRestoreDispatch {
|
||||
OpenGlBindFramebufferFn bind_framebuffer = nullptr;
|
||||
};
|
||||
|
||||
[[nodiscard]] OpenGlCapabilities detect_opengl_capabilities(
|
||||
std::span<const std::string_view> extensions,
|
||||
OpenGlRuntime runtime) noexcept;
|
||||
@@ -437,6 +451,12 @@ struct OpenGlFramebufferReadbackDispatch {
|
||||
[[nodiscard]] pp::foundation::Status readback_opengl_framebuffer(
|
||||
OpenGlFramebufferReadback readback,
|
||||
OpenGlFramebufferReadbackDispatch dispatch) noexcept;
|
||||
[[nodiscard]] pp::foundation::Result<OpenGlFramebufferBindingState> bind_opengl_framebuffer_for_draw_read(
|
||||
std::uint32_t framebuffer,
|
||||
OpenGlFramebufferBindDispatch dispatch) noexcept;
|
||||
[[nodiscard]] pp::foundation::Status restore_opengl_framebuffer_binding(
|
||||
OpenGlFramebufferBindingState binding,
|
||||
OpenGlFramebufferRestoreDispatch 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