This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Partial framebuffer clears in OpenGL

I've stumbled upon a question in your forum related with what I want to achieve and would like to check if it could be used for my purpose. In my case I'm looking into rendering parts of the framebuffer at a different frequency, while preserving other parts (which shouldn't change across frames). So, ideally, I'd like to perform clears in specific areas to achieve that. Am I right in assuming that if do the following I'll be able to preserve partial framebuffer contents on Mali GPUs? So, the intention being to tell the driver I want to invalidate the "custom area" and the proceed with a clear and draw to the remaining areas.


// FRAME 1

glBindFramebuffer(fbo1)
glClear();

// draw everything needed

// FRAME 2-N
glBindFramebuffer(fbo1)
glScissor(fromX, fromY, custom_area_width, custom_area_height);
glInvalidateFramebuffer();
glClear();
glScissor(0, 0, fbo_width, fbo_height); // full screen

// draw only I care about outside the custom area

I'm aware of transaction elimination, but I'd like to (a) completely avoid rendering to areas I know are not changing and (b) preserve those across frames if possible.

Cheers!

Parents
  • Hi JPJ, 

    Before I answer the question, some initial config questions:

    * I assume that fbo1 here is an off-screen render target, not the window surface?

    * Are you using MSAA with the render target?

    Cheers, 
    Pete

Reply
  • Hi JPJ, 

    Before I answer the question, some initial config questions:

    * I assume that fbo1 here is an off-screen render target, not the window surface?

    * Are you using MSAA with the render target?

    Cheers, 
    Pete

Children