Hi Andy,
sorry forgot to reply to this. You can use the functor of QTextureImage
and either pass your pre-prepared image in a as a member of your custom
functor or you can do the actual painting using QPainter in the functors
function call operator. We aim to eventually add a convenience class for
this, QPaintedTextureImage or similar, kind of analogous to
QQuickPaintedItem.
Cheers,
Sean
On 07/04/2016 14:39, Andy wrote:
[bump]
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 <asmalo...@gmail.com
<mailto:asmalo...@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>
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest
--
Dr Sean Harmer | sean.har...@kdab.com | Managing Director UK
KDAB (UK) Ltd, a KDAB Group company
Tel. +44 (0)1625 809908; Sweden (HQ) +46-563-540090
Mobile: +44 (0)7545 140604
KDAB - Qt Experts
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest