Route import and node texture setup through helpers

This commit is contained in:
2026-06-13 05:36:45 +02:00
parent bb05fac00f
commit e82bcb6d56
5 changed files with 35 additions and 15 deletions

View File

@@ -2049,9 +2049,11 @@ void Canvas::import_equirectangular_thread(std::string file_path, std::shared_pt
m_sampler.bind(0);
set_active_texture_unit(0);
tex.bind();
ShaderManager::use(kShader::Texture);
ShaderManager::u_int(kShaderUniform::Tex, 0);
ShaderManager::u_mat4(kShaderUniform::MVP, glm::scale(glm::vec3(-1, -1, 1)));
pp::panopainter::setup_legacy_canvas_draw_merge_texture_shader(
pp::panopainter::LegacyCanvasDrawMergeTextureUniforms {
.mvp = glm::scale(glm::vec3(-1, -1, 1)),
.texture_slot = 0,
});
plane.draw_fill();
tex.unbind();
m_sampler.unbind();
@@ -2069,10 +2071,12 @@ void Canvas::import_equirectangular_thread(std::string file_path, std::shared_pt
m_sampler.bind(0);
set_active_texture_unit(0);
tex.bind();
ShaderManager::use(kShader::Texture);
ShaderManager::u_int(kShaderUniform::Tex, 0);
ShaderManager::u_mat4(kShaderUniform::MVP, proj * camera *
glm::eulerAngleY(glm::radians(180.f)) * glm::scale(glm::vec3(1, -1, 1)));
pp::panopainter::setup_legacy_canvas_draw_merge_texture_shader(
pp::panopainter::LegacyCanvasDrawMergeTextureUniforms {
.mvp = proj * camera *
glm::eulerAngleY(glm::radians(180.f)) * glm::scale(glm::vec3(1, -1, 1)),
.texture_slot = 0,
});
sphere.draw_fill();
tex.unbind();
m_sampler.unbind();