Results 1 to 6 of 6

Thread: Get the raw buffer of ShaderEffectSource(qml2)

  1. #1
    Join Date
    Jan 2011
    Posts
    127
    Thanks
    42
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Get the raw buffer of ShaderEffectSource(qml2)

    Do anyone know how to obtain the raw buffer of ShaderEffectSource? I would like to do some postprocessing on it(save image, video record etc)

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,017 Times in 4,793 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Get the raw buffer of ShaderEffectSource(qml2)

    "Get" it where? You can use a shader effect to do postprocessing of the shader effect source. I don't think saving a single item is possible. You can grab the whole window, if you want.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Jan 2011
    Posts
    127
    Thanks
    42
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Get the raw buffer of ShaderEffectSource(qml2)

    I can grab the whole window by grabWindow()
    but it is too slow if I want to record the qml scene as video
    That is why I want to get the raw buffer of the texture
    rendered by shaderEffectSource and encode it into
    a video file.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,017 Times in 4,793 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Get the raw buffer of ShaderEffectSource(qml2)

    And you really think stopping the GL pipeline and transferring the image back to the CPU memory would not be slow?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #5
    Join Date
    Jan 2011
    Posts
    127
    Thanks
    42
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Get the raw buffer of ShaderEffectSource(qml2)

    Quote Originally Posted by wysota View Post
    And you really think stopping the GL pipeline and transferring the image back to the CPU memory would not be slow?
    You hit the point, looks like this is not a good solution.
    What kind of solution could I use?

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,017 Times in 4,793 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Get the raw buffer of ShaderEffectSource(qml2)

    I think it depends how low-level can you go with your code. Tapping into QPA plugin would probably be best performance wide. But probably you can get away with using QQuickWindow::setRenderTarget() and passing an FBO that you can later convert to a image (possibly in another thread).
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  7. The following user says thank you to wysota for this useful post:

    stereoMatching (15th June 2013)

Similar Threads

  1. QAudioInput buffer underrun
    By vojta in forum Qt Programming
    Replies: 0
    Last Post: 2nd August 2012, 18:28
  2. QImage buffer
    By rafaelsegundo in forum Qt Programming
    Replies: 3
    Last Post: 24th June 2008, 06:48
  3. double buffer ,x11 only ?
    By deepinlife in forum Qt Programming
    Replies: 3
    Last Post: 22nd June 2008, 21:07
  4. Double Buffer
    By ^NyAw^ in forum Qt Programming
    Replies: 23
    Last Post: 29th January 2008, 18:35
  5. Buffer
    By AnithaRagupathy in forum Qt Programming
    Replies: 1
    Last Post: 2nd November 2007, 06:26

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.