Simple game engine with complete export to scripting language
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.

71 lines
1.6KB

  1. #ifndef BLUECORE_RENDER_WINDOW_H
  2. #define BLUECORE_RENDER_WINDOW_H
  3. // system includes
  4. #include <vector>
  5. // library includes
  6. #include "GL/glew.h"
  7. #include "GL/glfw.h"
  8. // project includes
  9. #include "Math/Vector.h"
  10. #include "Utilities/sigslot.h"
  11. #include "Utilities/Referenced.h"
  12. namespace BlueCore
  13. {
  14. class RenderWindow : public Referenced
  15. {
  16. private:
  17. static void WindowSizeCallback(int width, int height);
  18. static int WindowCloseCallback();
  19. static void WindowRefreshCallback();
  20. static void MousePosCallback(int x, int y);
  21. static void MouseButtonCallback(int button, int action);
  22. static void MouseWheelCallback(int pos);
  23. static void KeyCallback(int key, int action);
  24. static void CharCallback(int character, int action);
  25. bool _Resized;
  26. bool _Initialized;
  27. bool _Closed;
  28. int _Width, _Height;
  29. void resizeWindow(int width, int height);
  30. public:
  31. sigslot::signal0<> WindowCloseSignal;
  32. sigslot::signal2<int, int> WindowResizeSignal;
  33. sigslot::signal0<> WindowRefreshSignal;
  34. sigslot::signal2<int, int> MouseMoveSignal;
  35. sigslot::signal2<int, int> MouseButtonSignal;
  36. sigslot::signal1<int> MouseWheelSignal;
  37. sigslot::signal2<int, int> KeySignal;
  38. sigslot::signal1<int> CharSignal;
  39. public:
  40. RenderWindow();
  41. ~RenderWindow();
  42. bool create(int width, int height, int pixelbits, int depthbits,
  43. int stencilbits, bool fullscreen);
  44. void destroy();
  45. void closeWindow();
  46. int getWidth();
  47. int getHeight();
  48. bool isOpen();
  49. };
  50. }
  51. #endif