Multipass Rendering using QQuickFramebufferObject(s)
-
Hi,
I started to look into OpenGL a couple of weeks ago since I need it to perform some image processing (e.g. blurring images, edge detection) with it. I implemented a small multipass program that utilizes several FramebufferObjects (fbos) using opengl in combination with Glew/Glut. First, I a scene is rendered into a framebuffer object (fbo1) and then it is used in a second pass to perform Gaussian blurring and store it in another fbo2. Finally I applied edge detection to the texture attached to fbo2 and then output the result to the screen.
Similar to what is explained here:
http://in2gpu.com/2014/10/02/multiple-framebuffers-mrt/To make things more convenient, I would like to export the example described above to the QtQuick framework. I did some recherché and the QQuickFramebufferObject class seems to be the first choice for me. It creates an internal FBO, enforces a clean separation between the main and the rendering thread, no worries about mutex protection, …
http://doc.qt.io/qt-5/QQuickFramebufferObject .html
Since I am new to QtQuick and I also just started with OpenGL I was looking for an example that utilizes several FBO´s using the QQuickFramebufferObject class. I found a nice one that explains how to use the QQuickFramebufferObject class (utilizing a single FBO) under
https://github.com/KDAB/integrating-qq2-with-opengl ,
but I haven´t found an example or an explanation of how to use a QQuickFramebufferObject for multipass rendering to perform a task as I described in the first paragraph.
Therefore, I would really appreciate an example or an explanation of how to perform multipass rendering using the QQuickFramebufferObject class.
Thank you very much for your time and consideration!