2 #ifdef HEADLESS_HAS_GLFW
3 # include <Headless/OpenGLContext/OpenGLContext.hpp>
16 class HEADLESS_API GlfwOpenGLContext :
public OpenGLContext
29 explicit GlfwOpenGLContext(
const glbinding::Version& glVersion = { 4, 1 },
30 const std::array<int, 2>& size = { { 1, 1 } } );
32 ~GlfwOpenGLContext()
override;
33 void makeCurrent()
const override;
34 void doneCurrent()
const override;
35 bool isValid()
const override;
36 bool isWindow()
const override {
return true; }
38 [[nodiscard]] std::string getInfo()
const override;
40 void show( EventMode mode,
float delay )
override;
42 void resize(
const std::array<int, 2>& size )
override;
43 void renderLoop( std::function<
void(
float )> render )
override;
46 bool processEvents()
override;
49 GLFWwindow* m_glfwContext {
nullptr };