PBuffer usage with GLES2

Hi,

I want to make usage of the PBuffer surface to implement some off-screen rendering. (No render to texture). I have to use PBuffer because of some kind of abstraction, where we do not have access to the final window. The PBuffer content will copied into a bitmap container where it will finally blitted into a window screen.

I already had some problems with the GLES 1.1 emulation win32 sdk, but finally found a workaround by creating an invisible window, call eglMakeCurrent to that surface and creating afterwards a Pbuffer surface. (I was already confused, why I have to do this. But PBuffer creation without a window surface always failed).

Now I switched to the latest GLES 2.0 emulation win32 sdk (OGLES2_WINDOWS_PCEMULATION_2.06.26.0649) and the same config attrib list (only extended by the EGL_RENDERABLE_TYPE to use EGL_OPENGL_ES2_BIT) does not return a
valid configuration, that supports PBuffer surfaces.

Here is the attribute list, I want to query:


   static const EGLint configAttribs[] =    {
      EGL_BUFFER_SIZE,        32,
      EGL_RED_SIZE,           8,
      EGL_GREEN_SIZE,         8,
      EGL_BLUE_SIZE,          8,
      EGL_ALPHA_SIZE,         8,
      EGL_DEPTH_SIZE,         16,
      EGL_COLOR_BUFFER_TYPE,  EGL_RGB_BUFFER,
      EGL_STENCIL_SIZE,       EGL_DONT_CARE,
#if defined (GLES
      EGL_RENDERABLE_TYPE,    EGL_OPENGL_ES_BIT,
#elif defined (GLES2)
      EGL_RENDERABLE_TYPE,    EGL_OPENGL_ES2_BIT,
#endif     
      EGL_SURFACE_TYPE,          EGL_PBUFFER_BIT | EGL_WINDOW_BIT,
      EGL_NONE
   };
[/CODE]

Any idea whats going wrong here?
It would be also nice to know, why I have to create a window surface before I am allowed to create a PBuffer surface with the GLES 1.1 sdk.

Some additional infos, I am using an ATI Radeon HD 5450 and use only the emulation sdks at the moment.

Regards


<br>&nbsp;&nbsp; static const EGLint configAttribs[] =&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; EGL_BUFFER_SIZE,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 32,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; EGL_RED_SI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; EGL_NONE<br>&nbsp;&nbsp; };<br>

Any idea whats going wrong here?
It would be also nice to know, why I have to create a window surface before I am allowed to create a PBuffer surface with the GLES 1.1 sdk.

Some additional infos, I am using an ATI Radeon HD 5450 and use only the emulation sdks at the moment.

Regards



Push…
No comments to that problem?
At least some statement would be nice. I am currently a little bit lost with the sdk.
Thanks in advance


I'm afraid the engineer who works on PC emulation has been unable to look at this yet and I can't really shed much light on these issues. However, I don't believe that PBuffers are supported in PC emulation for OpenGL ES 2.0 at this time.

What device platform are you targetting and what OS? Is there a specific reason that you can't use FBOs?
Gordon2010-07-06 11:15:50

Thanks for the response.

I wanted to be sure, that I am not doing something wrong with PBuffers or with my EGL queries, because PBuffers were available with the GLES 1.1 emulation sdk, but not with the GLES 2.0 sdk.

I have a running workaround for PC emulation, so I am happe for now.

The decision for the target platform is not done yet, but I wanted to use the emulation SDK as a development plattform for a first prototyp.

I wanted to prevent the FBO usage currently, because I am not so familiar with them. I will try to change that soon.

Regards