Route final texture setup sites through helper
This commit is contained in:
@@ -475,9 +475,11 @@ void App::vr_draw(const glm::mat4& proj, const glm::mat4& camera, const glm::mat
|
||||
glm::translate(glm::vec3(0, 0, -1)) *
|
||||
glm::scale(aspect * tan_fov);
|
||||
sampler_linear.bind(0);
|
||||
ShaderManager::use(kShader::Texture);
|
||||
ShaderManager::u_int(kShaderUniform::Tex, 0);
|
||||
ShaderManager::u_mat4(kShaderUniform::MVP, mvp);
|
||||
pp::panopainter::setup_legacy_canvas_draw_merge_texture_shader(
|
||||
pp::panopainter::LegacyCanvasDrawMergeTextureUniforms {
|
||||
.mvp = mvp,
|
||||
.texture_slot = 0,
|
||||
});
|
||||
set_active_texture_unit(0);
|
||||
uirtt.bindTexture();
|
||||
m_face_plane.draw_fill();
|
||||
|
||||
@@ -765,9 +765,11 @@ void NodeCanvas::draw()
|
||||
m_sampler_nearest.bind(0);
|
||||
set_active_texture_unit(0);
|
||||
m_rtt.bindTexture();
|
||||
ShaderManager::use(kShader::Texture);
|
||||
ShaderManager::u_int(kShaderUniform::Tex, 0);
|
||||
ShaderManager::u_mat4(kShaderUniform::MVP, glm::ortho<float>(-1, 1, -1, 1));
|
||||
pp::panopainter::setup_legacy_canvas_draw_merge_texture_shader(
|
||||
pp::panopainter::LegacyCanvasDrawMergeTextureUniforms {
|
||||
.mvp = glm::ortho<float>(-1, 1, -1, 1),
|
||||
.texture_slot = 0,
|
||||
});
|
||||
m_face_plane.draw_fill();
|
||||
m_rtt.unbindTexture();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user