I want to create a pbuffer surface to draw something but do not want to show it, just want to copy the color buffer to the native memory.
Creating a Pbuffer Surface can create a window Surface first and bind it to a context, then create a pbuffer surface, just like this

eglChooseConfig(display,...) //for the window surface
eglCreateWindowSurface(display,...)
eglCreateContext(...)
eglMakeCurrent(display,...)

eglChooseConfig(display,...) //for the pbuffer surface
eglCreatePbufferSurface(display,...)

But I do not want to show anything on screen ,so I do not want to create a window surface .
If I do this and only create a pbuffer ,it get a error and return EGL_BAD_ALLOC.
Does it has to create a window surface and bind it to a context first ?