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

@@ -5,7 +5,6 @@
void NodeViewport::draw()
{
using namespace ui;
glm::mat4 cam = glm::lookAt(glm::vec3(sinf(angle) * 10, 0, -10), glm::vec3(0, 0, 0), glm::vec3(0, -1, 0));
glm::mat4 proj = glm::perspective<float>(glm::radians(45.f), m_clip.z / m_clip.w, .1f, 100);
@@ -22,9 +21,9 @@ void NodeViewport::draw()
TextureManager::get(m_tex_id).bind();
m_sampler->bind(0);
glEnable(GL_BLEND);
ui::ShaderManager::use(kShader::Texture);
ui::ShaderManager::u_int(kShaderUniform::Tex, 0);
ui::ShaderManager::u_mat4(kShaderUniform::MVP, proj * cam);
ShaderManager::use(kShader::Texture);
ShaderManager::u_int(kShaderUniform::Tex, 0);
ShaderManager::u_mat4(kShaderUniform::MVP, proj * cam);
m_faces->draw_fill();
m_sampler->unbind();
TextureManager::get(m_tex_id).unbind();
@@ -39,7 +38,7 @@ Node* NodeViewport::clone_instantiate() const
}
void NodeViewport::create()
{
m_faces = std::make_unique<ui::Plane>();
m_faces = std::make_unique<Plane>();
m_faces->create<1>(10, 10);
m_sampler = std::make_unique<Sampler>();
m_sampler->create();