Contextual creation is beyond the scope of the OpenGL API itself. GL contexts are created by the target graphics system, such as Windows GDI, X11 / GLX, Quartz / AGL. Now there is the concept of PBuffers, which can be used to create HW-accelerated OpenGL contexts that are not window bound. However, PBuffers are usually only available as an extension, so you need an OpenGL context to get so far. The solution is to create a dummy window that should never be visible on the screen, with which a dummy GL context is created to receive the extension. Then, using this, a PBuffer is created and an OpenGL context on it.
However, if you want to use FBOs, you do not need to jump through the PBuffer hoop. An invisible dummy window with an OpenGL context also does the job, since the rendering target will be FBO.
source share