Windowless OpenGL

后端 未结 5 1375
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-23 20:34

I would like to have a windowless OpenGL context (on both GNU/linux with Xorg and Windows). I\'m not going to render anything but only call functions like glGetString<

5条回答
  •  佛祖请我去吃肉
    2020-12-23 21:35

    Until you create a window, OpenGL has no idea what implementation you use. For example, there's a very different driver (and different hardware acceleration) for OpenGL in a remote X-Windows session vs OpenGL in an DRI X-Windows session. Shader language support might be different between these cases, and the output of the shader compiler is definitely going to be implementation-dependent, as well as any errors generated based on resource exhaustion.

    So while actually creating a window may not be 100% necessary, you have to associate your context with the graphics hardware (or lack thereof) somehow, and since this can be done with a window no one bothered implementing an alternate method.

提交回复
热议问题