Offscreen rendering with pbuffers in es 2.0

Hello!

I’m trying to perform some image processing with opengl ES 2.0 and EGL 1.3. My plan is to use the GPU to accelerate the processing. Everything seems to work fine except for one thing, I don’t want to show the result on the screen. I have been implementing a working solution that uses the screen but now I want to do it offscreen. My plan is:

  1. Create a pBufferSurface
  2. Render a covering quad with 1:1 texel pixel mapping
  3. Process data with shader
  4. Read back data with gl_readPixel(…) maybe a buffer copy?

Does it seems reasonable to you?

the first part seems to be a bit of a problem. Is there anyone who could supply me with a sample config to provide eglChooseConfig(…)?

I was successfully using a 24 bit RGB bitmap as texture when dealing with windowSurfaces, 8 bits / color but I can’t get this right.

My config looks like:

const EGLint ConfigAttribs[] =
	{
		EGL_LEVEL,				0,
		EGL_SURFACE_TYPE,		EGL_PBUFFER_BIT,
		EGL_RENDERABLE_TYPE,	EGL_OPENGL_ES2_BIT,
		EGL_NATIVE_RENDERABLE,	EGL_FALSE,
		EGL_DEPTH_SIZE,			EGL_DONT_CARE,
		EGL_NONE
	};

and eglCreatePbufferSurface(eglDisplay, eglConfig, NULL); just return zero.

Thanks for taking time.

Fredrik Berglund

By the way, what device are you using? Has it got hardware acceleration?

Cheers,
Roberto

At the moment I’m using a desktop computer with a simulator. The libs are provided free by Imagination. (http://www.imgtec.com)

I think hardware will soon be availible.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.