Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdafx.h"
- #include <SFML/Window.hpp>
- int main()
- {
- sf::Window App(sf::VideoMode(800, 600, 32), "FIS");
- sf::Clock Clock;
- glClearDepth(1.0f);
- glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
- glEnable(GL_DEPTH_TEST);
- glDepthMask(GL_TRUE);
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- gluPerspective(90.0f, 1.0f, 1.0f, 500.0f);
- while (App.IsOpened())
- {
- sf::Event Event;
- while (App.GetEvent(Event))
- {
- if (Event.Type == sf::Event::Closed)
- App.Close();
- if ((Event.Type == sf::Event::KeyPressed) && (Event.Key.Code == sf::Key::Escape))
- App.Close();
- if (Event.Type == sf::Event::Resized)
- glViewport(0, 0, Event.Size.Width, Event.Size.Height);
- }
- App.Display();
- }
- return 0;
- }
Add Comment
Please, Sign In to add comment