minor changes and added namespace to avoid conflicts when integrating with PanoPainter

This commit is contained in:
2017-03-15 08:17:22 +00:00
parent ee6d352fc6
commit c34d1a1f44
16 changed files with 112 additions and 39 deletions

View File

@@ -3,6 +3,8 @@
#include "util.h"
#include "asset.h"
using namespace ui;
Plane NodeBorder::m_plane;
Plane NodeImage::m_plane;
Sampler NodeImage::m_sampler;
@@ -137,8 +139,9 @@ void Node::update_internal(const glm::vec2& origin, const glm::mat4& proj)
glm::mat4 pivot = glm::translate(glm::vec3(.5f, .5f, 0.f));
glm::mat4 scale = glm::scale(glm::vec3(m_size, 1.f));
glm::mat4 prescale = glm::scale(glm::vec3(m_scale, 1.f));
glm::mat4 pos = glm::translate(glm::vec3(m_pos, 0));
m_mvp = proj * pos * scale * pivot;
m_mvp = proj * pos * scale * pivot * prescale;
m_proj = proj;
for (int i = 0; i < m_children.size(); i++)