Can you create OpenGL context without opening a window?

后端 未结 3 879
生来不讨喜
生来不讨喜 2020-12-05 04:20

Occassionally I hit places where I\'d want to get an OpenGL framebuffer object, but where I\'m not interested about opening a window of any kind.

Is it possible to c

3条回答
  •  日久生厌
    2020-12-05 05:14

    http://www.opengl.org/wiki/Creating_an_OpenGL_Context

    According to this Web page, WGL_ARB_create_context can be used to create a context without a window. I have not actually tried it myself. I used freeGLUT to create the context and then rendered off-screen to a framebuffer+renderbuffer. I exit the program without ever calling glutMainLoop. It is klugy, but it works for my purposes.

提交回复
热议问题