Skip to content
Snippets Groups Projects
Commit 973d1da2 authored by Alexander Gauggel's avatar Alexander Gauggel
Browse files

[#34] Fix minimize crash

parent 58cc9203
No related branches found
No related tags found
1 merge request!43Resolve "Resizing-Event"
Pipeline #25429 passed
...@@ -85,7 +85,7 @@ namespace vkcv { ...@@ -85,7 +85,7 @@ namespace vkcv {
void Camera::updateRatio( int width, int height){ void Camera::updateRatio( int width, int height){
m_width = width; m_width = width;
m_height = height; m_height = height;
m_ratio = static_cast<float>(width)/height; m_ratio = static_cast<float>(width)/glm::max(height, 1);
setPerspective( m_fov, m_ratio, m_near, m_far); setPerspective( m_fov, m_ratio, m_near, m_far);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment