Share target-aware framebuffer copy bridge
This commit is contained in:
24
src/util.cpp
24
src/util.cpp
@@ -740,7 +740,8 @@ void check_OpenGLError(const char* stmt, const char* fname, int line)
|
||||
}
|
||||
}
|
||||
|
||||
bool copy_framebuffer_to_texture_2d(
|
||||
bool copy_framebuffer_to_texture_target(
|
||||
uint32_t texture_target,
|
||||
int destination_x,
|
||||
int destination_y,
|
||||
int source_x,
|
||||
@@ -751,6 +752,7 @@ bool copy_framebuffer_to_texture_2d(
|
||||
{
|
||||
const auto status = pp::renderer::gl::copy_opengl_framebuffer_to_texture_2d(
|
||||
pp::renderer::gl::OpenGlTexture2DFramebufferCopy {
|
||||
.texture_target = texture_target,
|
||||
.level = level,
|
||||
.destination_x = destination_x,
|
||||
.destination_y = destination_y,
|
||||
@@ -769,6 +771,26 @@ bool copy_framebuffer_to_texture_2d(
|
||||
return true;
|
||||
}
|
||||
|
||||
bool copy_framebuffer_to_texture_2d(
|
||||
int destination_x,
|
||||
int destination_y,
|
||||
int source_x,
|
||||
int source_y,
|
||||
int width,
|
||||
int height,
|
||||
int level) noexcept
|
||||
{
|
||||
return copy_framebuffer_to_texture_target(
|
||||
pp::renderer::gl::texture_2d_target(),
|
||||
destination_x,
|
||||
destination_y,
|
||||
source_x,
|
||||
source_y,
|
||||
width,
|
||||
height,
|
||||
level);
|
||||
}
|
||||
|
||||
size_t curl_data_handler(void *contents, size_t size, size_t nmemb, void *userp)
|
||||
{
|
||||
auto buffer = reinterpret_cast<std::string*>(userp);
|
||||
|
||||
Reference in New Issue
Block a user