Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

QML: passing Canvas as ShaderEffectSource

I have a ShaderEffect in QtQuick 2.0 and I'm trying to pass a Canvas (which I'm drawing on) to it as it's ShaderEffectSource.

Does anyone know how to do this?

The ShaderEffect is willing to take an Image item as its ShaderEffectSource, but I can't figure out how to construct an Image from the Canvas. But maybe that's not the best idea anyways?

Thanks in advance!

like image 513
billy_blaze42 Avatar asked Oct 21 '22 08:10

billy_blaze42


1 Answers

In the meantime someone in the Qt Forum had an idea: http://qt-project.org/forums/viewthread/28416/

Works pretty good for what I am doing.

like image 175
billy_blaze42 Avatar answered Oct 27 '22 11:10

billy_blaze42