Results 1 to 4 of 4

Thread: How to copy pixel buffer to EGL pbuffer surface?

  1. #1
    Junior Member
    Join Date
    Nov 2008
    Posts
    1

    How to copy pixel buffer to EGL pbuffer surface?

    Hi All,

    I want to copy a raw pixel buffer to pbuffer surface, just update its color buffer, but the color buffer of pbuffer surface is not accessable. Is there any way to access the color buffer?

    Thanks.

  2. #2
    Super Moderator
    Join Date
    May 2008
    Posts
    18

    Re: How to copy pixel buffer to EGL pbuffer surface?

    At least one implementation has a vendor specific extension to that returns a pointer to the color buffer of the current surface. If you make your pbuffer surface current, you can retrieve its color buffer pointer through this extension.

    Absent such an extension, the best approach we've found is to create a texture, load it from the pixel buffer using glTexImage2D then render a couple of textured triangles using ortho projection.

  3. #3
    Junior Member
    Join Date
    Nov 2008
    Posts
    8

    Re: How to copy pixel buffer to EGL pbuffer surface?

    The only way I can think of is to create a gles texture, copy your pixels into the texture with glTexImage2D, and then render the texture into the pbuffer (e.g. render 2 triangles that cover the entire pbuffer).
    -Acorn
    -Acorn
    (Opinions are my own, and not necessarily shared by my company or others.)

  4. #4
    Super Moderator
    Join Date
    May 2008
    Posts
    18

    Re: How to copy pixel buffer to EGL pbuffer surface?

    In my previous reply, I forgot to mention that there is an OES_draw_texture extension supported by several implementations with which you can draw a texture into the color buffer. It's quicker than drawing 2 triangles and you don't need to change so much of the GL state to accomplish the drawing.

Similar Threads

  1. How to Copy content from EGL Pixmap/Pbuffer to the screen
    By mustaf in forum Cross API and window system integration
    Replies: 0
    Last Post: 01-15-2009, 12:06 AM
  2. How to copy content from pixmap surface to window surface
    By mustaf in forum OpenGL ES general technical discussions
    Replies: 0
    Last Post: 10-05-2008, 09:44 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •