Reputation: 13
I'm having problems with a custom item in QT because i want to map a texture in a geometry using updatePaintNode, What should I do to load an image as a Texture in a sceneGraph in QT in the updatePaintNode method? please help me with an example, i've been searching for examples but all I found were very confusing stuff.
Upvotes: 1
Views: 783
Reputation: 6735
The easiest way to get the texture, it is using QQuickWindow::createTextureFromImage function.
Another way is subclassing QSGTexture
and implement your custom binding function. For detail see QSGPlainTexture source code.
Upvotes: 1