🛠️🐜 Antkeeper superbuild with dependencies included https://antkeeper.com
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.

78 lines
2.0 KiB

  1. #ifndef X11_OPENGL_WINDOW_H
  2. #define X11_OPENGL_WINDOW_H
  3. #define b3gDefaultOpenGLWindow X11OpenGLWindow
  4. #include "CommonWindowInterface.h"
  5. class X11OpenGLWindow : public CommonWindowInterface
  6. {
  7. struct InternalData2* m_data;
  8. bool m_OpenGLInitialized;
  9. bool m_requestedExit;
  10. protected:
  11. void enableOpenGL();
  12. void disableOpenGL();
  13. void pumpMessage();
  14. int getAsciiCodeFromVirtualKeycode(int orgCode);
  15. public:
  16. X11OpenGLWindow();
  17. virtual ~X11OpenGLWindow();
  18. virtual void createWindow(const b3gWindowConstructionInfo& ci);
  19. virtual void closeWindow();
  20. virtual void startRendering();
  21. virtual void renderAllObjects();
  22. virtual void endRendering();
  23. virtual float getRetinaScale() const {return 1.f;}
  24. virtual void setAllowRetina(bool /*allowRetina*/) {};
  25. virtual void runMainLoop();
  26. virtual float getTimeInSeconds();
  27. virtual bool requestedExit() const;
  28. virtual void setRequestExit() ;
  29. virtual bool isModifierKeyPressed(int key);
  30. virtual void setMouseMoveCallback(b3MouseMoveCallback mouseCallback);
  31. virtual void setMouseButtonCallback(b3MouseButtonCallback mouseCallback);
  32. virtual void setResizeCallback(b3ResizeCallback resizeCallback);
  33. virtual void setWheelCallback(b3WheelCallback wheelCallback);
  34. virtual void setKeyboardCallback( b3KeyboardCallback keyboardCallback);
  35. virtual b3MouseMoveCallback getMouseMoveCallback();
  36. virtual b3MouseButtonCallback getMouseButtonCallback();
  37. virtual b3ResizeCallback getResizeCallback();
  38. virtual b3WheelCallback getWheelCallback();
  39. virtual b3KeyboardCallback getKeyboardCallback();
  40. virtual void setRenderCallback( b3RenderCallback renderCallback);
  41. virtual void setWindowTitle(const char* title);
  42. virtual int getWidth() const;
  43. virtual int getHeight() const;
  44. int fileOpenDialog(char* filename, int maxNameLength);
  45. };
  46. #endif