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 1.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*!
  2. * \file include/system/WindowSDL.h
  3. * \brief SDL2 Windowing Implementation
  4. *
  5. * \author xythobuz
  6. */
  7. #ifndef _WINDOW_SDL_H_
  8. #define _WINDOW_SDL_H_
  9. #include <string>
  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. static void setClipboard(const char* s);
  27. static const char* getClipboard();
  28. static void inputPositionCallback(int x, int y);
  29. static std::string getVersion(bool linked);
  30. private:
  31. static glm::i32vec2 size;
  32. static bool fullscreen;
  33. static bool mousegrab;
  34. static bool textinput;
  35. static SDL_Window* window;
  36. static SDL_GLContext context;
  37. static SDL_GameController* controller;
  38. };
  39. #endif