added alpha blending for image and text, nodes position are clamped to be integer

This commit is contained in:
2017-02-08 00:20:26 +00:00
parent 5e5ddf310c
commit de1784e932
4 changed files with 13 additions and 5 deletions

View File

@@ -46,8 +46,8 @@ void Node::update_internal(const glm::vec2& origin, const glm::mat4& proj)
if (m_widget)
{
glm::mat4 pivot = glm::translate(glm::vec3(.5f, .5f, 0.f));
glm::mat4 scale = glm::scale(glm::vec3(m_size, 1.f));
glm::mat4 pos = glm::translate(glm::vec3(m_pos, 0));
glm::mat4 scale = glm::scale(glm::vec3(glm::ceil(m_size), 1.f));
glm::mat4 pos = glm::translate(glm::vec3(glm::floor(m_pos), 0));
m_widget->mvp = proj * pos * scale * pivot;
m_widget->pos = pos;
m_widget->scale = scale;