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.

WindowGLFW.h 1.8KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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 <string>
  10. #include <glm/gtc/type_precision.hpp>
  11. struct GLFWwindow;
  12. class WindowGLFW {
  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 void errorCallback(int error, const char* desc);
  32. static void sizeCallback(GLFWwindow* w, int width, int height);
  33. static void cursorCallback(GLFWwindow* w, double xpos, double ypos);
  34. static void keyCallback(GLFWwindow* w, int key, int scancode, int action, int mods);
  35. static void charCallback(GLFWwindow* w, unsigned int codepoint);
  36. static void buttonCallback(GLFWwindow* w, int button, int action, int mods);
  37. static void scrollCallback(GLFWwindow* w, double xoffset, double yoffset);
  38. static KeyboardButton convertAsciiButton(int key);
  39. static glm::i32vec2 size;
  40. static bool fullscreen;
  41. static bool mousegrab;
  42. static bool textinput;
  43. static GLFWwindow* window;
  44. static int lastMouseX;
  45. static int lastMouseY;
  46. static bool modShift;
  47. static bool modControl;
  48. static bool modAlt;
  49. static bool modSuper;
  50. };
  51. #endif