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:
- Create a pBufferSurface
- Render a covering quad with 1:1 texel pixel mapping
- Process data with shader
- 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