virtual void OnResize(int width, int height) { BaseApplication::OnResize(width, height); for (auto& shape : spheres) { shape.SetMatrix4fParam("ProjectionMatrix", oglplus::CamMatrixf::PerspectiveX(oglplus::Degrees(60), double(width / 3)/height, 1, 10.0)); } for (auto& torus : toruses) { torus.SetMatrix4fParam("ProjectionMatrix", oglplus::CamMatrixf::PerspectiveX(oglplus::Degrees(60), double(width / 3)/height, 1, 10.0)); } }