Geno3D
A simple 3D visualisation library, using C++/SFML.
 All Classes Functions Variables
Engine.hpp
1 #pragma once
2 
3 #include <string>
4 #include <SFML/Graphics.hpp>
5 #include <memory>
6 #include "Scene.hpp"
7 
8 namespace Geno3D
9 {
15  class Engine {
16  public:
24  Engine(int width, int height, std::string title);
31  std::shared_ptr<Scene> scene;
36  void run();
37  private:
39  const float dt = 1.0f / 60.0f;
41  sf::Clock clock;
43  sf::RenderWindow window;
45  sf::Vector2i winSize;
46  };
47 }
void run()
Definition: Engine.cpp:12
Engine(int width, int height, std::string title)
Definition: Engine.cpp:5
const float dt
The target frame time in seconds (target of 60fps)
Definition: Engine.hpp:39
sf::Clock clock
The gameloop clock.
Definition: Engine.hpp:41
sf::RenderWindow window
The render window object.
Definition: Engine.hpp:43
sf::Vector2i winSize
Size of the window in x & y.
Definition: Engine.hpp:45
Definition: Engine.hpp:15
std::shared_ptr< Scene > scene
Definition: Engine.hpp:31