background_window.h 778 B

123456789101112131415161718192021222324252627282930313233
  1. #ifndef IGL_OPENGL_GLFW_BACKGROUND_WINDOW_H
  2. #define IGL_OPENGL_GLFW_BACKGROUND_WINDOW_H
  3. #include "../../igl_inline.h"
  4. #include "../gl.h"
  5. #include <GLFW/glfw3.h>
  6. namespace igl
  7. {
  8. namespace opengl
  9. {
  10. namespace glfw
  11. {
  12. /// Create a background window with a valid core profile opengl context
  13. /// set to current.
  14. ///
  15. /// After you're finished with this window you may call
  16. /// `glfwDestroyWindow(window)`
  17. ///
  18. /// After you're finished with glfw you should call `glfwTerminate()`
  19. ///
  20. /// @param[out] window pointer to glfw window
  21. /// @return true iff success
  22. IGL_INLINE bool background_window(GLFWwindow* & window);
  23. }
  24. }
  25. }
  26. #ifndef IGL_STATIC_LIBRARY
  27. # include "background_window.cpp"
  28. #endif
  29. #endif