Open Source Tomb Raider Engine
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

Window.h 948B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /*!
  2. * \file include/Window.h
  3. * \brief Windowing interface
  4. *
  5. * \author xythobuz
  6. */
  7. #ifndef _WINDOW_H_
  8. #define _WINDOW_H_
  9. /*!
  10. * \brief Windowing interface
  11. */
  12. class Window {
  13. public:
  14. virtual ~Window() {}
  15. virtual void setSize(unsigned int width, unsigned int height) = 0;
  16. virtual void setFullscreen(bool fullscreen) = 0;
  17. virtual void setMousegrab(bool grab) = 0;
  18. virtual int initialize() = 0;
  19. virtual void eventHandling() = 0;
  20. virtual void setTextInput(bool on) = 0;
  21. virtual void delay(unsigned int ms) = 0;
  22. virtual void swapBuffersGL() = 0;
  23. virtual unsigned int getWidth();
  24. virtual unsigned int getHeight();
  25. virtual int initializeGL();
  26. virtual void resizeGL();
  27. virtual void glEnter2D();
  28. virtual void glExit2D();
  29. protected:
  30. bool mInit;
  31. bool mFullscreen;
  32. bool mMousegrab;
  33. unsigned int mWidth;
  34. unsigned int mHeight;
  35. };
  36. Window &getWindow();
  37. #endif