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

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