[Interest] [Qt3D] Set up a QDirectionalLight

Nye kshegunov at gmail.com
Sun Dec 6 11:54:13 CET 2015


Oh, that explains it. I have the 5.5.1 version from the repositories.
By the way, great job guys! I'm really impressed with the work and thought
put into Qt3D, it is really impressive!

Kind regards.

On Sun, Dec 6, 2015 at 9:23 AM, Sean Harmer <sean.harmer at kdab.com> wrote:

> Hi,
>
> On 06/12/2015 08:12, Nye wrote:
>
> Hello,
> How one goes about setting a light source for a scene? I tried by creating
> a QDirectionalLight and adding it as a component to my mesh/root node, but
> it doesn't show. Is this part of the Qt3D implemented, or is it just an
> interface for now?
>
> Here is the a sample code I'm using:
>
> Qt3D::QDirectionalLight * light = new Qt3D::QDirectionalLight();
>
> light->setColor(Qt::red);
>
> light->setDirection(QVector3D(0, -1, 0));
>
> light->setEnabled(true);
>
> lamp->addComponent(mesh);
>
> lamp->addComponent(material);
>
> lamp->addComponent(transforms);
>
> lamp->addComponent(light);
>
>
> Also I'm getting a weird message in the debug window:Qt3D::QDirectionalLight::setProperty: Property "positionTransformed" invalid, read-only or does not existThanks in advance.
>
>
> Please be sure to use the HEAD of 5.6. Laszlo was working on directional
> lights just the other day. Point lights and directional lights should work
> now. Spotlights will appear shortly.
>
> Cheers,
>
> Sean
>
> Kind regards.
>
>
>
> _______________________________________________
> Interest mailing listInterest at qt-project.orghttp://lists.qt-project.org/mailman/listinfo/interest
>
>
>
> --
> Dr Sean Harmer | sean.harmer at 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 at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20151206/72e15b38/attachment.html>


More information about the Interest mailing list