Results 1 to 2 of 2

Thread: Can eglCreateWindowSurface be used for off-screen rendering?

  1. #1
    Junior Member Newbie
    Join Date
    Aug 2016
    Posts
    2

    Can eglCreateWindowSurface be used for off-screen rendering?

    Hello,

    we're are wondering if eglCreateWindowSurface can be used for off-screen rendering and benefit from the eglSwapBuffers function instead of using the time consuming function glReadPixels.
    Or should we only use eglCreatePbufferSurface which we know is made for off-screen rendering?

    Thanks,

    Tanguy
    Last edited by Wonderketchup; 11-21-2016 at 03:36 AM.

  2. #2
    Junior Member Newbie
    Join Date
    Feb 2012
    Posts
    7
    Hi,
    When you use eglCreateWindowSurface, the buffers are generally ownership of the window system and part of the "window". The only way to get to the pixels is to use glReadPixels or use eglLockSurface and query for the buffer and all the attributes that describe its memory layout. But that is not always supported.

    eglCreatePbufferSurface was intended for use of offscreen rendering - specifically EGL owns the buffer. However, since the addition of GL/GLES Renderbuffers objects these can be more efficient and have all the same features.

    If access to the pixels is paramount, and your driver supports it, creating an EGLImage using eglCreateImage you either provide or have access to a texture, made from the image, or image made from texture, that can be used with a Framebufferobject. Then you can access the pixels of the image - provided you understand the memory layout of the pixels/buffer.

    Hope that covers your use case.
    Jeff

Similar Threads

  1. Replies: 0
    Last Post: 11-16-2014, 02:45 AM
  2. Android: eglCreateWindowSurface - invalid arguments
    By threaderslash in forum OpenGL ES
    Replies: 1
    Last Post: 04-08-2012, 06:59 AM
  3. eglCreateWindowSurface fails with EGL_BAD_MATCH
    By Teraslilja in forum OpenGL ES
    Replies: 0
    Last Post: 05-12-2011, 09:03 AM
  4. eglCreateWindowSurface
    By othouven in forum EGL
    Replies: 3
    Last Post: 11-17-2009, 04:44 PM
  5. Replies: 5
    Last Post: 06-17-2004, 11:51 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean