Skip to content
Snippets Groups Projects

Resolve "Resizing-Event"

Merged Ghost User requested to merge 34-resizing-event into develop
1 file
+ 1
1
Compare changes
  • Side-by-side
  • Inline
@@ -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);
}
}
Loading