Update examples for iOS including touch support, proper handling of window resize, launch screens and icons

This commit is contained in:
Jonny Paton 2019-01-18 15:04:03 +00:00 committed by Lukas Dürrenberger
parent 9f4a0c3c4f
commit 353c846c87
12 changed files with 141 additions and 9 deletions

View file

@ -129,7 +129,13 @@ int main()
// Resize event: adjust the viewport
if (event.type == sf::Event::Resized)
{
glViewport(0, 0, event.size.width, event.size.height);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
GLfloat ratio = static_cast<float>(event.size.width) / event.size.height;
glFrustum(-ratio, ratio, -1.f, 1.f, 1.f, 500.f);
}
}
// Clear the color and depth buffers