Open Source Tomb Raider Engine
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

WindowGLFW.h 1.6KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /*!
  2. * \file include/system/WindowGLFW.h
  3. * \brief GLFW windowing implementation
  4. *
  5. * \author xythobuz
  6. */
  7. #ifndef _WINDOW_GLFW_H_
  8. #define _WINDOW_GLFW_H_
  9. #include <glm/gtc/type_precision.hpp>
  10. #include <GLFW/glfw3.h>
  11. class WindowGLFW {
  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. private:
  28. static void errorCallback(int error, const char* desc);
  29. static void sizeCallback(GLFWwindow* w, int width, int height);
  30. static void cursorCallback(GLFWwindow* w, double xpos, double ypos);
  31. static void keyCallback(GLFWwindow* w, int key, int scancode, int action, int mods);
  32. static void buttonCallback(GLFWwindow* w, int button, int action, int mods);
  33. static void scrollCallback(GLFWwindow* w, double xoffset, double yoffset);
  34. static KeyboardButton convertAsciiButton(int key);
  35. static glm::i32vec2 size;
  36. static bool fullscreen;
  37. static bool mousegrab;
  38. static bool textinput;
  39. static GLFWwindow* window;
  40. static int lastMouseX;
  41. static int lastMouseY;
  42. static bool modShift;
  43. static bool modControl;
  44. static bool modAlt;
  45. static bool modSuper;
  46. };
  47. #endif