PDA

View Full Version : Offscreen pixmap



openglestwouser
10-09-2011, 12:30 PM
Hi,

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.

bloodtoes
10-13-2011, 03:09 PM
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. :)

http://www.khronos.org/opengles/sdk/docs/man/

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