diff --git a/opengl.cpp b/opengl.cpp index 185af7f..f7dcc35 100644 --- a/opengl.cpp +++ b/opengl.cpp @@ -34,7 +34,14 @@ int main() App.Close(); if (Event.Type == sf::Event::Resized) + { glViewport(0, 0, Event.Size.Width, Event.Size.Height); + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + gluPerspective(90.f, + (float)Event.Size.Width / (float)Event.Size.Height, + 1.f, 500.f); + } }