@@ -160,7 +160,6 @@ void GLSceneLayer::set_transform(const Transformd& transform)
160160{
161161 m_camera_matrix = transform.get_parent_to_local ();
162162 m_gl_view_matrix = transpose (m_camera_matrix);
163- m_camera_position = Vector3f (m_camera_matrix.extract_translation ());
164163}
165164
166165void GLSceneLayer::slot_synchronize_camera ()
@@ -399,7 +398,6 @@ void GLSceneLayer::init_gl(QSurfaceFormat format)
399398
400399 m_depthonly_view_mat_location = m_gl->glGetUniformLocation (m_depthonly_shader_program, " u_view" );
401400 m_depthonly_proj_mat_location = m_gl->glGetUniformLocation (m_depthonly_shader_program, " u_proj" );
402- m_depthonly_camera_pos_location = m_gl->glGetUniformLocation (m_depthonly_shader_program, " u_camera_pos" );
403401
404402 const float z_near = 0 .01f ;
405403 const float z_far = 1000 .0f ;
@@ -492,10 +490,6 @@ void GLSceneLayer::draw()
492490 1 ,
493491 false ,
494492 const_cast <const GLfloat*>(&m_gl_proj_matrix[0 ]));
495- m_gl->glUniform3fv (
496- m_scene_camera_pos_location,
497- 1 ,
498- const_cast <const GLfloat*>(&m_camera_position[0 ]));
499493
500494 render_scene ();
501495
@@ -529,10 +523,6 @@ void GLSceneLayer::draw_depth_only()
529523 1 ,
530524 false ,
531525 const_cast <const GLfloat*>(&m_gl_proj_matrix[0 ]));
532- m_gl->glUniform3fv (
533- m_depthonly_camera_pos_location,
534- 1 ,
535- const_cast <const GLfloat*>(&m_camera_position[0 ]));
536526
537527 render_scene ();
538528
0 commit comments