Open Source Tomb Raider Engine
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

WindowGLFW.h 1.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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. static void inputPositionCallback(int x, int y);
  28. private:
  29. static void errorCallback(int error, const char* desc);
  30. static void sizeCallback(GLFWwindow* w, int width, int height);
  31. static void cursorCallback(GLFWwindow* w, double xpos, double ypos);
  32. static void keyCallback(GLFWwindow* w, int key, int scancode, int action, int mods);
  33. static void buttonCallback(GLFWwindow* w, int button, int action, int mods);
  34. static void scrollCallback(GLFWwindow* w, double xoffset, double yoffset);
  35. static KeyboardButton convertAsciiButton(int key);
  36. static glm::i32vec2 size;
  37. static bool fullscreen;
  38. static bool mousegrab;
  39. static bool textinput;
  40. static GLFWwindow* window;
  41. static int lastMouseX;
  42. static int lastMouseY;
  43. static bool modShift;
  44. static bool modControl;
  45. static bool modAlt;
  46. static bool modSuper;
  47. };
  48. #endif