Offscreen pixmap


I need to create an off screen pixmap for my application and would like to find the most efficient way using OpenGL ES 2.0 / EGL with X windows. I have come across several options and would like to understand the advantages and at the very least the best solution. The possibilities I came across are:

  1. Native X windows implementation using XCreatePixmap/XPutImage/XCopyArea
  2. EGL implementation eglCreatePixmapSurface…
  3. Using a FBO - glGenFramebuffersEXT…

Thanks a lot for any feedback.

The first 2 things are OS-dependent. GLES2 supports framebuffer functions, so you do not need to use glGenFramebuffersEXT, glGenFramebuffers is part of the core api. This is certainly the way you want to go. Generate framebuffers, attach a renderbuffer or a texturebuffer to it with the resolution you want, draw, then read it using glReadPixels, or pass it to a shader as a texture object… plenty of options. :slight_smile:

BTW I am not sure that GLES2 is supported on x-windows, perhaps you are intending to use desktop GL?

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