Exposing last frame to pixel shader using FBO Qt5.1



  • Hi all,

    I have a "subclass ":https://github.com/Sushisource/wubwub/blob/master/src/viz/vizwidget.cpp of QGLWidget which just draws a fullscreen quad and passes data to a fragmentation shader to act as a visualizer.

    I want to grab the last frame and pass it in again to the frag shader as a texture, which seems like it should be easy, but I can't seem to find any non-QML examples.

    Can anyone point me to any, or come up with one? Thanks!



  • It's OpengGL specific question.

    I suggest you to render frame to texture frame buffer and then pass it agine to fragment shader (bound as another texture).

    Sorry but I can'y give you any example right now (I've done something like this a while ago).

    try google "opengl render to texture" or something like this.

    While using QGLWidget you don't have to use Qt specific classes like QOpenGLBuffer you can use any opengl features as long your system supports it.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.