Update examples for iOS including touch support, proper handling of window resize, launch screens and icons
This commit is contained in:
parent
9f4a0c3c4f
commit
353c846c87
12 changed files with 141 additions and 9 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue