Move simple UI blend mapping to renderer gl

This commit is contained in:
2026-06-02 08:31:31 +02:00
parent d8e958769b
commit b7c087617b
7 changed files with 21 additions and 11 deletions

View File

@@ -2,6 +2,7 @@
#include "app.h"
#include "log.h"
#include "node_text_input.h"
#include "renderer_gl/opengl_capabilities.h"
#include "node_border.h"
Node* NodeTextInput::clone_instantiate() const
@@ -219,13 +220,13 @@ void NodeTextInput::draw()
ShaderManager::u_int(kShaderUniform::Tex, 0);
ShaderManager::u_mat4(kShaderUniform::MVP, m_proj * pos);
ShaderManager::u_vec4(kShaderUniform::Col, m_color);
glEnable(GL_BLEND);
glEnable(pp::renderer::gl::blend_state());
m_text_mesh.draw();
glDisable(GL_BLEND);
glDisable(pp::renderer::gl::blend_state());
if (m_cursor_visible)
{
glDisable(GL_BLEND);
glDisable(pp::renderer::gl::blend_state());
glm::mat4 cur_pos = glm::translate(glm::vec3(m_pos + m_off + xy(m_text_mesh.cur_box), 0));
glm::mat4 cur_scale = glm::scale(glm::vec3(zw(m_text_mesh.cur_box), 1));
glm::mat4 cur_pivot = glm::translate(glm::vec3(0.5, 0.5, 0));