Route canvas mode and preview texture setup through helpers

This commit is contained in:
2026-06-13 05:38:58 +02:00
parent e82bcb6d56
commit 1ae623000a
4 changed files with 33 additions and 15 deletions

View File

@@ -775,9 +775,11 @@ void NodeStrokePreview::draw_stroke()
void NodeStrokePreview::draw()
{
ShaderManager::use(kShader::Texture);
ShaderManager::u_mat4(kShaderUniform::MVP, m_mvp);
ShaderManager::u_int(kShaderUniform::Tex, 0);
pp::panopainter::setup_legacy_canvas_draw_merge_texture_shader(
pp::panopainter::LegacyCanvasDrawMergeTextureUniforms {
.mvp = m_mvp,
.texture_slot = 0,
});
m_tex_preview.bind();
m_sampler_linear.bind(0);
m_plane.draw_fill();