Skip to content

Commit

Permalink
Update glcanvas.cpp
Browse files Browse the repository at this point in the history
mlivesu committed Dec 16, 2024
1 parent 8174c95 commit 387c55b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/cinolib/gl/glcanvas.cpp
Original file line number Diff line number Diff line change
@@ -571,8 +571,8 @@ void GLcanvas::window_size_event(GLFWwindow *window, int width, int height)
v->trackball.last_click_2d = vec2d(inf_double); // fixes crazy translation deltas after window resizing!
v->camera.reset_projection(); // update the camera frustum
v->update_GL_projection(); // update OpenGL's projection matrix
#ifdef WIN32
// this fixes canvas resize issues under Windows, but also breaks in on Mac....
#ifndef __APPLE__
// this fixes canvas resize issues under Windows and Linux
glViewport(0,0,width,height); // update viewport
#endif
v->draw(); // refresh canvas while resizing

0 comments on commit 387c55b

Please sign in to comment.