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:
@@ -34,7 +34,7 @@ void NodeStrokePreview::init_controls()
|
||||
m_sampler_brush.create();
|
||||
m_sampler_brush.set_filter(GL_LINEAR_MIPMAP_LINEAR, GL_LINEAR);
|
||||
// TextureManager::load("data/thumbs/Round-Hard.png");
|
||||
// ui::Canvas::I->m_current_brush.m_tex_id = const_hash("data/thumbs/Round-Hard.png");
|
||||
// Canvas::I->m_current_brush.m_tex_id = const_hash("data/thumbs/Round-Hard.png");
|
||||
}
|
||||
|
||||
void NodeStrokePreview::restore_context()
|
||||
@@ -56,7 +56,6 @@ void NodeStrokePreview::draw_stroke()
|
||||
{
|
||||
m_rtt.bindFramebuffer();
|
||||
{
|
||||
using namespace ui;
|
||||
GLint vp[4];
|
||||
GLfloat cc[4];
|
||||
glGetIntegerv(GL_VIEWPORT, vp);
|
||||
@@ -69,8 +68,8 @@ void NodeStrokePreview::draw_stroke()
|
||||
glm::mat4 proj = glm::ortho<float>(0, (float)m_rtt.getWidth(), 0, (float)m_rtt.getHeight(), -1, 1);
|
||||
|
||||
auto b = m_brush;
|
||||
m_stroke.m_camera.fov = ui::Canvas::I->m_cam_fov;
|
||||
m_stroke.m_camera.rot = ui::Canvas::I->m_cam_rot;
|
||||
m_stroke.m_camera.fov = Canvas::I->m_cam_fov;
|
||||
m_stroke.m_camera.rot = Canvas::I->m_cam_rot;
|
||||
m_stroke.reset();
|
||||
m_stroke.start(b);
|
||||
if (!m_stroke.m_keypoints.empty())
|
||||
@@ -127,10 +126,9 @@ void NodeStrokePreview::draw_stroke()
|
||||
|
||||
void NodeStrokePreview::draw()
|
||||
{
|
||||
using namespace ui;
|
||||
ui::ShaderManager::use(kShader::Texture);
|
||||
ui::ShaderManager::u_mat4(kShaderUniform::MVP, m_mvp);
|
||||
ui::ShaderManager::u_int(kShaderUniform::Tex, 0);
|
||||
ShaderManager::use(kShader::Texture);
|
||||
ShaderManager::u_mat4(kShaderUniform::MVP, m_mvp);
|
||||
ShaderManager::u_int(kShaderUniform::Tex, 0);
|
||||
m_rtt.bindTexture();
|
||||
m_sampler.bind(0);
|
||||
m_plane.draw_fill();
|
||||
|
||||
Reference in New Issue
Block a user