Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Exposing last frame to pixel shader using FBO Qt5.1

    General and Desktop
    2
    2
    785
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      Sushisource last edited by

      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!

      1 Reply Last reply Reply Quote 0
      • 8
        8majkel8 last edited by

        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.

        1 Reply Last reply Reply Quote 0
        • First post
          Last post