Open Source Tomb Raider Engine
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

WindowSDL.h 1000B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*!
  2. * \file include/system/WindowSDL.h
  3. * \brief SDL windowing implementation
  4. *
  5. * \author xythobuz
  6. */
  7. #ifndef _WINDOW_SDL_H_
  8. #define _WINDOW_SDL_H_
  9. #include <glm/vec2.hpp>
  10. #include <glm/gtc/type_precision.hpp>
  11. #include "SDL.h"
  12. class WindowSDL {
  13. public:
  14. static int initialize();
  15. static void eventHandling();
  16. static void swapBuffers();
  17. static void shutdown();
  18. static void setSize(glm::i32vec2 s);
  19. static glm::i32vec2 getSize() { return size; }
  20. static void setFullscreen(bool f);
  21. static bool getFullscreen() { return fullscreen; }
  22. static void setMousegrab(bool g);
  23. static bool getMousegrab() { return mousegrab; }
  24. static void setTextInput(bool t);
  25. static bool getTextInput() { return textinput; }
  26. private:
  27. static glm::i32vec2 size;
  28. static bool fullscreen;
  29. static bool mousegrab;
  30. static bool textinput;
  31. static SDL_Window* window;
  32. static SDL_GLContext context;
  33. static SDL_GameController* controller;
  34. };
  35. #endif