View Full Version : Can I only Create a Pbuffer without create a window surface

12-29-2011, 10:50 PM
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

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

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 ?

12-30-2011, 01:25 AM
Just like the problem here http://www.imgtec.com/forum/forum_posts.asp?TID=854
why I have to create a window surface before I am allowed to create a PBuffer surface with the GLES 1.1 sdk.

01-06-2012, 07:53 PM
The spec doesn't require a window surface to render to a pbuffer surface. Are you making the pbuffer surface current?

02-04-2012, 11:14 AM
Also use attribute EGL_PBUFFER_BIT in your attributes to eglChooseConfig.