I'm trying to get PBuffers to work on N95. Everything works okay if I create my pbuffer using the same EGL config as my main context.
On my handset there is only one config with EGL_WINDOW_BIT set, so this is obviously the config the main context needs. However there are many tempting looking other configs with EGL_PBUFFER_BIT set that would be preferable for the pbuffer (16 bit, no alpha channel, etc.)
If I create a pbuffer using any of these configs I cannot select the display into the main context (eglMakeCurrent returns EGL_BAD_MATCH). Fair enough, so I create a context for each pbuffer. This seems to basically 'work' (no errors), however I can't make these sub-contexts share texture objects with the main context (eglCreateContext returns EGL_BAD_MATCH). AFAICT this means I cannot get my surface into a texture object that I can render to the main surface (or a compatible surface) with...
Am I missing something really obvious? I've spend the last day or so reading descriptions of how it's supposed to work and I think I'm doing the right thing. I haven't seen any examples that create a seperate context for the pbuffer, so is there some special way of forcing the main context to take the incompatible pbuffer? Surely all these extra configs must be accessible somehow?
It would be great if someone could help me out with this one...