Using PBuffers on N95

This topic contains 2 replies, has 2 voices, and was last updated by  mark 8 years, 6 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #29750


    Hello there,


    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…




    Unfortunately EGL has a restriction that limits the EGL surfaces you can use with a context to “compatible” ones, i.e. ones with the same colour depth as the config that was used with eglCreateContext. So using context sharing is indeed the only way to use a 32-bit EGL window surface and a 16-bit EGL pbuffer together. This should generally work, though, although it is not a requirement for EGL implementations to support context sharing. Your best bet would be to contact Nokia about this.

    Have you tried using a 32-bit pbuffer with the same context?



    Yes, it works fine with a 32bit pbuffer. I wanted to save some memory by using a 16bit one.

Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic.