background_window.h 803 B

1234567891011121314151617181920212223242526272829303132333435
  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. #define GLFW_INCLUDE_GLU
  6. #include <GLFW/glfw3.h>
  7. namespace igl
  8. {
  9. namespace opengl
  10. {
  11. namespace glfw
  12. {
  13. // Create a background window with a valid core profile opengl context
  14. // set to current.
  15. //
  16. // After you're finished with this window you may call
  17. // `glfwDestroyWindow(window)`
  18. //
  19. // After you're finished with glfw you should call `glfwTerminate()`
  20. //
  21. // Outputs:
  22. // window pointer to glfw window
  23. // Returns true iff success
  24. IGL_INLINE bool background_window(GLFWwindow* & window);
  25. }
  26. }
  27. }
  28. #ifndef IGL_STATIC_LIBRARY
  29. # include "background_window.cpp"
  30. #endif
  31. #endif