Route retained readbacks through GL backend

This commit is contained in:
2026-06-04 23:20:06 +02:00
parent 9190e9053a
commit 2a4698e9f6
5 changed files with 88 additions and 34 deletions

View File

@@ -231,19 +231,7 @@ void NodePanelGrid::init_controls()
m_texture.create_mipmaps();
#else
// get the texture data and resize it
Image img;
img.create(m_texture.size().x, m_texture.size().y);
App::I->render_task([&]
{
m_texture.bind();
glGetTexImage(
pp::renderer::gl::texture_2d_target(),
0,
pp::renderer::gl::rgba_pixel_format(),
pp::renderer::gl::unsigned_byte_component_type(),
img.m_data.get());
m_texture.unbind();
});
Image img = m_texture.get_image();
Image resized = img.resize(texres, texres);
m_texture.create(resized);
m_texture.create_mipmaps();