[Interest] [Qt3D] Use a QImage as a QTextureImage

Andy asmaloney at gmail.com
Thu Apr 7 15:39:16 CEST 2016


Does anyone have any suggestions on how to use an in-memory QImage as a
QTextureImage?  Or any other way to create a QNormalDiffuseMapAlphaMaterial
from an in-memory QImage?  I must be missing something obvious.

Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>

On Tue, Apr 5, 2016 at 8:30 AM, Andy <asmaloney at gmail.com> wrote:

> I have a QImage that I'm generating programmatically using a QPainter
> which I want to use as a texture.
> I want to use it in a QNormalDiffuseMapAlphaMaterial as a diffuse texture
> - so it needs a QTextureImage whose source is set using a QUrl.
> How do I get from my in-memory QImage to a QUrl to set this source?  Or is
> there another path I'm missing to accomplish this?
> I'm also going to want to render text as a billboard - is this the right
> way to do it too?  (Generate into a QImage with QPainter and use textures
> on a QPlaneMesh?)
> (C++, not QML)
> Thanks!
> ---
> Andy Maloney  //  https://asmaloney.com
> twitter ~ @asmaloney <https://twitter.com/asmaloney>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20160407/587453c5/attachment.html>

More information about the Interest mailing list