Share retained utility GL dispatch bridges

This commit is contained in:
2026-06-05 15:05:07 +02:00
parent ad9b91eeda
commit 96d1903cf2
5 changed files with 69 additions and 108 deletions

View File

@@ -91,6 +91,27 @@ inline void read_opengl_pixels(
pixels);
}
inline void copy_opengl_tex_sub_image_2d(
std::uint32_t target,
std::int32_t level,
std::int32_t destination_x,
std::int32_t destination_y,
std::int32_t source_x,
std::int32_t source_y,
std::int32_t width,
std::int32_t height) noexcept
{
glCopyTexSubImage2D(
static_cast<GLenum>(target),
static_cast<GLint>(level),
static_cast<GLint>(destination_x),
static_cast<GLint>(destination_y),
static_cast<GLint>(source_x),
static_cast<GLint>(source_y),
static_cast<GLsizei>(width),
static_cast<GLsizei>(height));
}
inline pp::renderer::gl::OpenGlTexture2DReadbackDispatch texture_2d_readback_dispatch() noexcept
{
return pp::renderer::gl::OpenGlTexture2DReadbackDispatch {
@@ -123,6 +144,13 @@ inline pp::renderer::gl::OpenGlFramebufferReadbackDispatch framebuffer_readback_
};
}
inline pp::renderer::gl::OpenGlTexture2DFramebufferCopyDispatch framebuffer_to_texture_copy_dispatch() noexcept
{
return pp::renderer::gl::OpenGlTexture2DFramebufferCopyDispatch {
.copy_tex_sub_image_2d = copy_opengl_tex_sub_image_2d,
};
}
inline pp::renderer::gl::OpenGlFramebufferBindDispatch framebuffer_bind_dispatch() noexcept
{
return pp::renderer::gl::OpenGlFramebufferBindDispatch {