background_window.h 777 B

12345678910111213141516171819202122232425262728293031323334
  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. // Outputs:
  21. // window pointer to glfw window
  22. // Returns true iff success
  23. IGL_INLINE bool background_window(GLFWwindow* & window);
  24. }
  25. }
  26. }
  27. #ifndef IGL_STATIC_LIBRARY
  28. # include "background_window.cpp"
  29. #endif
  30. #endif