Off screen rendering buffer - PBuffer understanding

Hello,

I need to understand the use of pbuffers. When I call eglCreatePbufferSurface, it would return a surface. But, I need to understand how to use the surface that will be created by the API. I am trying to find some examples, but some exaplanation on this will be good enough to start off. I am a newbie to EGL- OGLES.

Thanks

It’s like any other EGL surface in usage, you can create a context, make it current to a thread and render using any of the supported khronos APIs. Pbuffers in particular are exclusively off-screen and have no native tie ins, there completely managed by EGL. You can also use pbuffers to effectively do a render to texture since you can bind a pbuffers as textures in GLES. You can also create pbuffers which are larger then the screen which you can’t do with EGL window surfaces, so you can pre-render more content. However, if available generally frame buffer objects are nicer to use for render to texture type behavior. You can also use pbuffers for benchmarking, since it allows you to take presentation out of the equation.