Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: EGL double buffering

  1. #1
    Junior Member
    Join Date
    Aug 2007
    Location
    INDIA
    Posts
    29

    EGL double buffering

    When i have a EGL setup with double buffer mode, then if i create a pbuffer surface will it also have front buffer and the back buffer like we have in case of window surface.

    In case of window surface, we know that we write in the back buffer of window surface and whatever content is present in front buffer, is shown on to the display.

    But pbuffer contents are never shown on display.So, can any one please tell me what is the use of front buffer in case of pbuffer here?

  2. #2
    Junior Member
    Join Date
    Aug 2007
    Location
    INDIA
    Posts
    29

    no reply??

    I am little surprised to see no reply this..is the question not clear?..If not, then i can clarify if any one has doubt over the question

  3. #3
    Senior Member
    Join Date
    May 2006
    Posts
    353
    Pbuffers are single buffered.
    Georg Kolling, Imagination Technologies
    Please ask questions specific to PowerVR hardware or SDKs on the PowerVR Insider Forum
    DevTech@imgtec.com | http://www.powervrinsider.com

  4. #4
    Junior Member
    Join Date
    Aug 2007
    Location
    INDIA
    Posts
    29
    Hi Xmas,

    I am quite new to this domain, so excuse me if i say anything which is not correct.

    Are pbuffers always single buffered or it depends on the underline EGL implementation?..Because, i hv seen mentioning of front & back buffer for pbuffers in lot of places in the EGL spec.

    Also, in the ref implementation of OPENVG which is available in khronos site, talks about back mentioning back buffer when we are creating pbuffer.

    Ia there any thing, which i am missing here?..please help me.

    Thanks.

  5. #5
    Senior Member
    Join Date
    May 2006
    Posts
    353
    Quote Originally Posted by mustaf
    Are pbuffers always single buffered or it depends on the underline EGL implementation?..Because, i hv seen mentioning of front & back buffer for pbuffers in lot of places in the EGL spec.
    There's no mention of front buffers in the spec. The EGL spec says that pbuffers are back buffered because the memory is managed by EGL, and there is no way you could access intermediate rendering results anyway.

    So the implementation details are completely hidden.
    Georg Kolling, Imagination Technologies
    Please ask questions specific to PowerVR hardware or SDKs on the PowerVR Insider Forum
    DevTech@imgtec.com | http://www.powervrinsider.com

  6. #6
    Junior Member
    Join Date
    Aug 2007
    Location
    INDIA
    Posts
    29
    Quote Originally Posted by xmas
    There's no mention of front buffers in the spec. The EGL spec says that pbuffers are back buffered because the memory is managed by EGL, and there is no way you could access intermediate rendering results anyway.

    So the implementation details are completely hidden.
    You are right that there is no mentioning of front buffer in the spec. Actually i have seen
    Quote Originally Posted by From the Spec
    When the client is finished drawing a frame, the back buffer may be copied to a visible window using eglSwapBuffers (Section 2.2.2 Rendering Models in EGL spec 1.3).
    so i interpreted this visible window as the front buffer.

    Am i wrong here in my interpretation?

    Also, while discussing Rendering model in section 2.2.2, it is mentioned that
    Quote Originally Posted by From the spec
    Pbuffer surfaces have a back buffer but no associated window, so the back buffer need not be copied.
    I did not understand what this statement means.Could you please clarify?

  7. #7
    Senior Member
    Join Date
    May 2006
    Posts
    353
    Quote Originally Posted by mustaf
    You are right that there is no mentioning of front buffer in the spec. Actually i have seen
    Quote Originally Posted by From the Spec
    When the client is finished drawing a frame, the back buffer may be copied to a visible window using eglSwapBuffers (Section 2.2.2 Rendering Models in EGL spec 1.3).
    so i interpreted this visible window as the front buffer.

    Am i wrong here in my interpretation?
    From the point of view of the application it is the front buffer. However, the window system might be doing some composition work (like the Vista Aero desktop), and in such a case the window buffer is not the actual front buffer (the buffer that is sent to the screen).

    Also, while discussing Rendering model in section 2.2.2, it is mentioned that
    Quote Originally Posted by From the spec
    Pbuffer surfaces have a back buffer but no associated window, so the back buffer need not be copied.
    I did not understand what this statement means.Could you please clarify?
    It means that a pbuffer is an off-screen surface that doesn't have a front buffer (or window buffer, see above) associated with it. Thus there is no need to call eglSwapBuffers when you've finished rendering to a pbuffer.
    Georg Kolling, Imagination Technologies
    Please ask questions specific to PowerVR hardware or SDKs on the PowerVR Insider Forum
    DevTech@imgtec.com | http://www.powervrinsider.com

  8. #8
    Junior Member
    Join Date
    Aug 2007
    Location
    INDIA
    Posts
    29
    Hi George,

    Thanks for your reply, now it is getting clear.

    So, that means "Is it possible that in the same EGL implementation i can have my windows surface as double-buffered whereas the pbuffer as single-buffered"?

    My initial understanding was even though it depends on the underline EGL implementation but the EGL implementation would be such that if windows surface is double-buffered, then pbuffer also has to be double -buffered and, if it is single-buffered, then both the surfaces have to be single-buffered.

    Thanks

  9. #9
    Senior Member
    Join Date
    May 2006
    Posts
    353
    Quote Originally Posted by mustaf
    So, that means "Is it possible that in the same EGL implementation i can have my windows surface as double-buffered whereas the pbuffer as single-buffered"?
    Yes, that is what the EGL spec says.
    Georg Kolling, Imagination Technologies
    Please ask questions specific to PowerVR hardware or SDKs on the PowerVR Insider Forum
    DevTech@imgtec.com | http://www.powervrinsider.com

  10. #10
    Junior Member
    Join Date
    Aug 2007
    Location
    INDIA
    Posts
    29

    Example of double buffered pbuffer

    Hi,

    So, is there any implementation where we have double buffered pbuffer?I have some question regarding the double buffered pbuffer

    1>Can we specify which buffer of pbuffer is used for writing to pbuffer and which for reading from pbuffer?
    2>Who takes care of the synchronization issue i.e. whether simultaneously reading and writing is possible.
    3>Do i need to explicitly call eglswapbuffers on pbuffer to transfer the content from back buffer to front buffer?


    What is the effect if i call eglswapbuffers on single buffered pbuffer?My opinion is it is a NOP, but just want to confirm.I have verified in the rasteroid (Hybrid) exmaple that it is a NOP.

    In case of single buffered pbuffer, how is the synchronization happen i.e. we are not reading and writing to/from pbuffer simultaneously.

    Thanks,

Page 1 of 2 12 LastLast

Similar Threads

  1. Double buffer
    By learnwebgl in forum Developers Coding:Beginner
    Replies: 5
    Last Post: 11-08-2009, 11:09 AM
  2. Single-Buffering with EGL
    By SSNTails in forum Cross API and window system integration
    Replies: 1
    Last Post: 04-19-2007, 06:22 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
  •