remove ui namespace which is not really used, move CameraData in camera_modes.h to avoid the inclusion of canva.h

This commit is contained in:
2018-11-27 14:24:01 +01:00
parent f34ffa825d
commit 0c6b409606
57 changed files with 538 additions and 597 deletions

View File

@@ -3,7 +3,7 @@
#include "node_border.h"
#include "shader.h"
ui::Plane NodeBorder::m_plane;
Plane NodeBorder::m_plane;
NodeBorder::NodeBorder()
{
@@ -60,14 +60,13 @@ void NodeBorder::parse_attributes(kAttribute ka, const tinyxml2::XMLAttribute* a
}
void NodeBorder::draw()
{
using namespace ui;
ui::ShaderManager::use(kShader::Color);
ui::ShaderManager::u_mat4(kShaderUniform::MVP, m_mvp);
ShaderManager::use(kShader::Color);
ShaderManager::u_mat4(kShaderUniform::MVP, m_mvp);
if (m_color.a > 0.f)
{
m_color.a < 1.f ? glEnable(GL_BLEND) : glDisable(GL_BLEND);
ui::ShaderManager::u_vec4(kShaderUniform::Col, m_color);
ShaderManager::u_vec4(kShaderUniform::Col, m_color);
m_plane.draw_fill();
glDisable(GL_BLEND);
}
@@ -75,7 +74,7 @@ void NodeBorder::draw()
if (m_thinkness > 0 && m_border_color.a > 0.f)
{
glLineWidth(m_thinkness);
ui::ShaderManager::u_vec4(kShaderUniform::Col, m_border_color);
ShaderManager::u_vec4(kShaderUniform::Col, m_border_color);
m_border_color.a < 1.f ? glEnable(GL_BLEND) : glDisable(GL_BLEND);
m_plane.draw_stroke();
glDisable(GL_BLEND);