Route RTT texture updates through GL backend
This commit is contained in:
@@ -4,7 +4,6 @@
|
||||
#include "canvas.h"
|
||||
#include "canvas_actions.h"
|
||||
#include "node_panel_layer.h"
|
||||
#include "renderer_gl/opengl_capabilities.h"
|
||||
|
||||
void ActionStroke::undo()
|
||||
{
|
||||
@@ -37,22 +36,12 @@ void ActionStroke::undo()
|
||||
{
|
||||
App::I->render_task([&]
|
||||
{
|
||||
const auto texture_target = pp::renderer::gl::texture_2d_target();
|
||||
const auto pixel_format = pp::renderer::gl::rgba_pixel_format();
|
||||
const auto component_type = pp::renderer::gl::unsigned_byte_component_type();
|
||||
|
||||
m_canvas->m_layers[m_layer_idx]->rtt(i, m_frame_idx).bindTexture();
|
||||
glTexSubImage2D(
|
||||
texture_target,
|
||||
0,
|
||||
m_canvas->m_layers[m_layer_idx]->rtt(i, m_frame_idx).updateRgba8(
|
||||
(int)m_box[i].x,
|
||||
(int)m_box[i].y,
|
||||
(int)box_sz.x,
|
||||
(int)box_sz.y,
|
||||
pixel_format,
|
||||
component_type,
|
||||
m_image[i].get());
|
||||
m_canvas->m_layers[m_layer_idx]->rtt(i, m_frame_idx).unbindTexture();
|
||||
});
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user