Route RTT texture updates through GL backend
This commit is contained in:
@@ -695,15 +695,11 @@ void LayerFrame::restore(const Snapshot& snap)
|
||||
// it's just a quick fix DON'T SHIP!!
|
||||
//m_rtt[i].recreate();
|
||||
|
||||
m_rtt[i].bindTexture();
|
||||
glm::vec2 box_sz = zw(m_dirty_box[i]) - xy(m_dirty_box[i]);
|
||||
glTexSubImage2D(pp::renderer::gl::texture_2d_target(), 0,
|
||||
m_rtt[i].updateRgba8(
|
||||
static_cast<int>(m_dirty_box[i].x), static_cast<int>(m_dirty_box[i].y),
|
||||
static_cast<int>(box_sz.x), static_cast<int>(box_sz.y),
|
||||
pp::renderer::gl::rgba_pixel_format(),
|
||||
pp::renderer::gl::unsigned_byte_component_type(),
|
||||
snap.image[i].get());
|
||||
m_rtt[i].unbindTexture();
|
||||
LOG("restore face %d - %d bytes (%dx%d)", i,
|
||||
(int)box_sz.x * (int)box_sz.y * 4, (int)box_sz.x, (int)box_sz.y);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user