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.

Window.h 1.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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 bool getFullscreen() { return mFullscreen; }
  18. virtual void setMousegrab(bool grab) = 0;
  19. virtual bool getMousegrab() { return mMousegrab; }
  20. virtual int initialize() = 0;
  21. virtual void eventHandling() = 0;
  22. virtual void setTextInput(bool on) = 0;
  23. virtual bool getTextInput() { return mTextInput; }
  24. virtual void swapBuffersGL() = 0;
  25. virtual unsigned int getWidth() { return mWidth; }
  26. virtual unsigned int getHeight() { return mHeight; }
  27. virtual int initializeGL();
  28. virtual void resizeGL();
  29. virtual void glEnter2D();
  30. virtual void glExit2D();
  31. static void lookAt(float eyeX, float eyeY, float eyeZ,
  32. float lookAtX, float lookAtY, float lookAtZ,
  33. float upX, float upY, float upZ);
  34. protected:
  35. bool mInit;
  36. bool mFullscreen;
  37. bool mMousegrab;
  38. bool mTextInput;
  39. unsigned int mWidth;
  40. unsigned int mHeight;
  41. };
  42. Window& getWindow();
  43. #endif