Open Source Tomb Raider Engine
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

WindowSDL.h 1.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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/gtc/type_precision.hpp>
  10. #include "SDL.h"
  11. class WindowSDL {
  12. public:
  13. static int initialize();
  14. static void eventHandling();
  15. static void swapBuffers();
  16. static void shutdown();
  17. static void setSize(glm::i32vec2 s);
  18. static glm::i32vec2 getSize() { return size; }
  19. static void setFullscreen(bool f);
  20. static bool getFullscreen() { return fullscreen; }
  21. static void setMousegrab(bool g);
  22. static bool getMousegrab() { return mousegrab; }
  23. static void setTextInput(bool t);
  24. static bool getTextInput() { return textinput; }
  25. static void setClipboard(const char* s);
  26. static const char* getClipboard();
  27. static void inputPositionCallback(int x, int y);
  28. private:
  29. static glm::i32vec2 size;
  30. static bool fullscreen;
  31. static bool mousegrab;
  32. static bool textinput;
  33. static SDL_Window* window;
  34. static SDL_GLContext context;
  35. static SDL_GameController* controller;
  36. };
  37. #endif