Open Source Tomb Raider Engine
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

WindowGLFW.h 1.5KB

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