implement layer bounds optminize function, add history to draw_objects with the right bounds.

This commit is contained in:
2019-01-18 19:03:53 +01:00
parent ff4ce5f379
commit e0bb60980a
6 changed files with 146 additions and 6 deletions

View File

@@ -75,7 +75,7 @@ void NodeCanvas::draw()
//m_canvas->m_cam_rot = m_pan * 0.003f;
glm::mat4 ortho_proj = glm::ortho(0.f, box.z, 0.f, box.w, -1000.f, 1000.f);
glm::mat4 proj = glm::perspective(glm::radians(m_canvas->m_cam_fov), box.z / box.w, 0.01f, 1000.f);
glm::mat4 proj = glm::perspective(glm::radians(m_canvas->m_cam_fov), box.z / box.w, 0.001f, 1000.f);
glm::mat4 camera = m_canvas->m_cam_rot * glm::translate(m_canvas->m_cam_pos);
m_canvas->m_mv = camera;