Open Source Tomb Raider Engine
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

WindowGLUT.h 1.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /*!
  2. * \file include/WindowGLUT.h
  3. * \brief GLUT windowing implementation
  4. *
  5. * \author xythobuz
  6. */
  7. #ifndef _WINDOW_GLUT_H_
  8. #define _WINDOW_GLUT_H_
  9. #include "Window.h"
  10. /*!
  11. * \brief GLUT windowing implementation
  12. */
  13. class WindowGLUT : public Window {
  14. public:
  15. WindowGLUT();
  16. virtual void setSize(unsigned int width, unsigned int height);
  17. virtual void setFullscreen(bool fullscreen);
  18. virtual void setMousegrab(bool grab);
  19. virtual bool getMousegrab();
  20. virtual int initialize();
  21. virtual void eventHandling();
  22. virtual void setTextInput(bool on);
  23. virtual bool getTextInput();
  24. virtual void swapBuffersGL();
  25. private:
  26. static void reshapeCallback(int width, int height);
  27. static void keyboardCallback(unsigned char key, int x, int y);
  28. static void keyboardUpCallback(unsigned char key, int x, int y);
  29. static void specialCallback(int key, int x, int y);
  30. static void specialUpCallback(int key, int x, int y);
  31. static void mouseCallback(int button, int state, int x, int y);
  32. static void motionCallback(int x, int y);
  33. static void mouseWheelCallback(int wheel, int direction, int x, int y);
  34. static KeyboardButton convertAsciiButton(unsigned char key);
  35. static KeyboardButton convertKeyCode(int key);
  36. };
  37. #endif