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.1KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*!
  2. * \file include/WindowGLFW.h
  3. * \brief GLFW windowing implementation
  4. *
  5. * \author xythobuz
  6. */
  7. #ifndef _WINDOW_GLFW_H_
  8. #define _WINDOW_GLFW_H_
  9. #include <GLFW/glfw3.h>
  10. #include "system/Window.h"
  11. class WindowGLFW : public Window {
  12. public:
  13. WindowGLFW();
  14. virtual ~WindowGLFW();
  15. virtual void setSize(unsigned int width, unsigned int height);
  16. virtual void setFullscreen(bool fullscreen);
  17. virtual void setMousegrab(bool grab);
  18. virtual int initialize();
  19. virtual void eventHandling();
  20. virtual void setTextInput(bool on);
  21. virtual void swapBuffersGL();
  22. private:
  23. static void errorCallback(int error, const char* desc);
  24. static void sizeCallback(GLFWwindow* w, int width, int height);
  25. static void cursorCallback(GLFWwindow* w, double xpos, double ypos);
  26. static void keyCallback(GLFWwindow* w, int key, int scancode, int action, int mods);
  27. static void buttonCallback(GLFWwindow* w, int button, int action, int mods);
  28. static void scrollCallback(GLFWwindow* w, double xoffset, double yoffset);
  29. static KeyboardButton convertAsciiButton(int key);
  30. GLFWwindow* mWindow;
  31. };
  32. #endif