Skip to content
Snippets Groups Projects
Commit 9560fac9 authored by Jonas Johan Solsvik's avatar Jonas Johan Solsvik :video_game:
Browse files

main.cpp / add window TODOs

parent 591ed0b9
No related branches found
No related tags found
1 merge request!1Fix #6, #7 and #8 - Open window, draw and move circle + collsion example
......@@ -6,9 +6,18 @@
int main()
{
// # Create the main window and camera
sf::RenderWindow window(sf::VideoMode(800, 600), "Double trouble");
window.setFramerateLimit(90);
sf::View camera(sf::FloatRect(0, 0, 800, 600));
//
// ## TODO
// - [ ] Make framerate limit adjustable
// - [ ] Make video and camera size the same as hardware window size
// - [ ] Resize video and camera size when user resizes window.
//
const int WIDTH = 800;
const int HEIGHT = 600;
const int FRAMERATE_LIMIT = 90;
sf::RenderWindow window(sf::VideoMode(WIDTH, HEIGHT), "Double trouble");
window.setFramerateLimit(FRAMERATE_LIMIT);
sf::View camera(sf::FloatRect(0, 0, WIDTH, HEIGHT));
camera.setCenter(0, 0);
window.setView(camera);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment