void camera::update_view_projection_matrix() const { if (projection_dirty || view_dirty) { if (projection_dirty) { update_projection_matrix(); } if (view_dirty) { update_view_matrix(); } view_projection = projection * view; } }
void Camera::update_view_pre() { //model_stack->push(); //update_view_buffer(); update_view_matrix(); model_stack->load_matrix(get_view_matrix()); }
float *camera::get_view_matrix() const { update_view_matrix(); return glm::value_ptr(view); }