+ int ViewportWidth() const { return m_viewport_width; }
+ int ViewportHeight() const { return m_viewport_height; }
+
+ // Debug Font handling
+ void DebugFontInit(const char *font_name, float font_size = 12);
+ void DebugFontClear();
+ void DebugFontPrint(const char *str);
+ void DebugFontPrintF(const char *fmt, ...);
+
+ // Handle mouse input.
+ typedef std::function<void(int x, int y, int button, int wheel)> MouseHandler;
+ void SetMouseHandler(MouseHandler handler)
+ {
+ m_mouse_handler = handler;
+ }
+
+ enum MouseCursors
+ {
+ CursorArrow,
+ CursorWait,
+ CursorWaitArrow,
+ CursorMove,
+ CursorHand
+ };
+ void SetMouseCursor(MouseCursors cursor);
+
+ void ScreenShot(const char * filename) const;
+ void RenderBMP(const char * filename) const;
+ void RenderPixels(int x, int y, int w, int h, uint8_t * pixels) const;
+
+
+
+ // Returns the CPU time (in seconds) it took to render the last completed frame.
+ double GetLastFrameTimeCPU() const { return m_last_frame_time / SDL_GetPerformanceFrequency(); }
+ // Returns the GPU time (in seconds) it took to render the last completed frame.
+ double GetLastFrameTimeGPU() const;