Route import and node texture setup through helpers
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#include "pch.h"
|
||||
#include "app_core/grid_ui.h"
|
||||
#include "legacy_canvas_draw_merge_services.h"
|
||||
#include "legacy_grid_ui_services.h"
|
||||
#include "legacy_ui_overlay_services.h"
|
||||
#include "log.h"
|
||||
@@ -343,11 +344,11 @@ void NodePanelGrid::draw_heightmap(const glm::mat4& proj, const glm::mat4& camer
|
||||
auto aspect_ratio = static_cast<float>(viewport.height) / static_cast<float>(viewport.width);
|
||||
apply_grid_capability(pp::renderer::gl::blend_state(), true);
|
||||
apply_grid_capability(pp::renderer::gl::depth_test_state(), false);
|
||||
ShaderManager::use(kShader::Texture);
|
||||
ShaderManager::u_int(kShaderUniform::Tex, 0);
|
||||
ShaderManager::u_mat4(kShaderUniform::MVP, glm::ortho(-1.f, 1.f, -1.f, 1.f) *
|
||||
//glm::scale(glm::vec3(100)) *
|
||||
glm::translate(glm::vec3(p2d, 0)) * glm::scale(glm::vec3(.1f * aspect_ratio, .1f, 1.f)));
|
||||
pp::panopainter::setup_legacy_canvas_draw_merge_texture_shader({
|
||||
.mvp = glm::ortho(-1.f, 1.f, -1.f, 1.f) *
|
||||
//glm::scale(glm::vec3(100)) *
|
||||
glm::translate(glm::vec3(p2d, 0)) * glm::scale(glm::vec3(.1f * aspect_ratio, .1f, 1.f)),
|
||||
.texture_slot = 0});
|
||||
set_grid_active_texture_unit(0U);
|
||||
m_sampler_linear.bind(0);
|
||||
constexpr auto sun_tex = const_hash("data/sun.png");
|
||||
|
||||
Reference in New Issue
Block a user