Route framebuffer texture copies through GL backend
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
#include "app.h"
|
||||
#include "paint_renderer/compositor.h"
|
||||
#include "renderer_gl/opengl_capabilities.h"
|
||||
#include "util.h"
|
||||
#include <algorithm>
|
||||
#include <cstdint>
|
||||
|
||||
@@ -208,8 +209,7 @@ glm::vec4 NodeStrokePreview::stroke_draw_samples(
|
||||
if (copy_stroke_destination)
|
||||
{
|
||||
// this is also used by the mixer
|
||||
glCopyTexSubImage2D(pp::renderer::gl::texture_2d_target(), 0, tex_pos.x, tex_pos.y,
|
||||
tex_pos.x, tex_pos.y, tex_sz.x, tex_sz.y);
|
||||
copy_framebuffer_to_texture_2d(tex_pos.x, tex_pos.y, tex_pos.x, tex_pos.y, tex_sz.x, tex_sz.y);
|
||||
}
|
||||
|
||||
if (P.size() == 4)
|
||||
@@ -432,9 +432,7 @@ void NodeStrokePreview::draw_stroke_immediate()
|
||||
// copy raw stroke to tex
|
||||
glActiveTexture(pp::renderer::gl::active_texture_unit(1U));
|
||||
m_tex_dual.bind();
|
||||
glCopyTexSubImage2D(
|
||||
pp::renderer::gl::texture_2d_target(),
|
||||
0,
|
||||
copy_framebuffer_to_texture_2d(
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
@@ -453,9 +451,7 @@ void NodeStrokePreview::draw_stroke_immediate()
|
||||
m_plane.draw_fill();
|
||||
//m_rtt.clear({ .3f, .3f, .3f, 1.f });
|
||||
m_tex_background.bind();
|
||||
glCopyTexSubImage2D(
|
||||
pp::renderer::gl::texture_2d_target(),
|
||||
0,
|
||||
copy_framebuffer_to_texture_2d(
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
@@ -508,9 +504,7 @@ void NodeStrokePreview::draw_stroke_immediate()
|
||||
// copy raw stroke to tex
|
||||
glActiveTexture(pp::renderer::gl::active_texture_unit(1U));
|
||||
m_tex.bind();
|
||||
glCopyTexSubImage2D(
|
||||
pp::renderer::gl::texture_2d_target(),
|
||||
0,
|
||||
copy_framebuffer_to_texture_2d(
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
@@ -564,9 +558,7 @@ void NodeStrokePreview::draw_stroke_immediate()
|
||||
|
||||
// copy the result to the actual preview
|
||||
m_tex_preview.bind();
|
||||
glCopyTexSubImage2D(
|
||||
pp::renderer::gl::texture_2d_target(),
|
||||
0,
|
||||
copy_framebuffer_to_texture_2d(
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
|
||||
Reference in New Issue
Block a user