11 * The "Screen" class handles managing the OS window (using SDL2).
19 // 'Pumps' the system event queue.
20 // Returns 'false' if the program should quit.
23 // Finishes rendering a frame, and presents it on the screen.
26 // Get the current width/height of the window's viewport.
27 int ViewportWidth() const { return m_viewport_width; }
28 int ViewportHeight() const { return m_viewport_height; }
30 // Handle mouse input.
31 typedef std::function<void(int x, int y, int button, int wheel)> MouseHandler;
32 void SetMouseHandler(MouseHandler handler)
34 m_mouse_handler = handler;
45 void SetMouseCursor(MouseCursors cursor);
47 void ScreenShot(const char * filename) const;
49 void ResizeViewport(int width, int height);
51 MouseHandler m_mouse_handler;
56 int m_viewport_height;
58 SDL_GLContext m_gl_context;