Mix FBO with default frame

To clarify, when I say "default framebuffer", I mean the one that is provided by the windowing system and what ends up on your monitor.

To improve the rendering speed for the CAD application, I managed to isolate 3D elements from Qt-processed 2D objects, and now they each turn into their own FBO. When the time comes to get them on the screen, I launched 3D FBO on FB by default, and then I want to mix my 2D FBO over it.

I got to the whitish part in order, but I don’t see how to mix my 2D-FBO on it? Both FBOs are identical in size and format, and both are the same as the default FBs.

I am sure this is a simple operation, but I can’t find anything on the net - apparently, I am missing the correct term for what I am trying to do. Although I use Qt, I can easily use my own OpenGL commands.

+5
source share
3 answers

A brilliant operation is ultimately a pixel copy operation. If you want to stack one image on top of another, you cannot split it. Instead, you should display the full-screen box as a texture and use the appropriate blending options for your blending operation.

+7
source

GL_EXT_framebuffer_blit blit framebuffer ( ), , , :

. , blit, - .

, , . , , .

+1

use a shader to read frames from the buffer. it is an extension of OpenGL ES, not support for all hardware.

https://www.khronos.org/registry/gles/extensions/EXT/EXT_shader_framebuffer_fetch.txt

0
source

All Articles