Results 1 to 2 of 2

Thread: PBuffer flickering

  1. #1
    Newbie
    Join Date
    Feb 2016
    Posts
    1

    PBuffer flickering

    Hello,

    i'm using a Raspberry PI and OpenGLES 2.

    I'm using a PBuffer in a thread, rendering some content in parallel. This is what i'm doing:

    1. Create context and surface for window
    2. Create in other thread context and pbuffer

    Main process main loop: Activate context of window, drawing my content to the window from step 1, when using the PBuffer as texture bind it with eglBindTexImage and unbind after usage. Deactivate context of window
    In thread loop: Activate Context from step 2, draw stuff, call glFLush and glFinish and deactivate context.

    The content of the PBuffer is flickering, it's like i can watch step by step how the content of the Pbuffer is draw. The main loop stuff is rendering at 55FPS, the content of the PBuffer at 10-15FPS.

    I'm doing something wrong?

    Thank you in advance.
    Regards Mario

  2. #2
    Senior Member
    Join Date
    May 2008
    Posts
    104
    You're likely rendering to the texture while it's being sampled. There's lots of potential solutions, the simplest would be moving everything to a single thread or adding a mutex between the threads, to something more complicated and efficient like keeping the threads, using an EGL shared context with multiple EGL Images and EGL fences to synchronize content.

    -Joel

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