[Interest] Qt3D: Problem with QSkybox basename property

Ch'Gans chgans at gna.org
Wed Apr 19 02:20:41 CEST 2017


On 18 April 2017 at 22:58, Sean Harmer <sean.harmer at kdab.com> wrote:
> Hi,
>
> On 18/04/2017 10:10, Ch'Gans wrote:
>>
>> Hi there,
>>
>> I have just tried the sky box entity with Qt-5.9-beta, and found a
>> small problem:
>> If you don't specify a basename or if the basename is malformed, the
>> GUI will freeze.
>> As the documentation doesn't specify that the basename should be in a
>> QUrl compatible format, I stupidly set the basename to
>> '/somewhere/basename', it's only after looking at the source that i
>> realised that. Using 'file:///somewhere/basename' fixed the problem.
>> Shouldn't the documentation be updated to reflect that? Maybe simply
>> replacing 'basename' with 'baseUrl' would give the right clue to the
>> user, along with plainly saying that basename + suffix + extension
>> should form a string that can be used with QUrl.
>
>
> I'm actually tempted to avoid  the entire issue and just require that the
> user provide a QAbstractTexture object that contains a cubemap texture
> target. It's trivial  to do this with a dds file already but we can add a
> convenience helper if  you want to be able to build a cubemap texture object
> from a set of 2D images. That will make the API minimal and complete by

Well, how QSkyBox could be more minimal, I was able to add a sky box
to my scene with just 3 lines of code!:
auto skyBox = new QSkyBox(rootEntity);
skyBox->setBasename(...);
skyBox->setExtension(...);


> delegating the complexity to other classes such as QTextureLoader.

I had a quick look at DDS, this looks interesting, but requires some
extra tooling if I'm not wrong. For novice like me and certainly for
quick prototyping and or debugging, an API similar to the current one
is very convenient indeed.

Chris

>
> Thanks for the feedback.
>
> Sean
>
>>
>> Thanks,
>> Chris
>> _______________________________________________
>> Interest mailing list
>> Interest at qt-project.org
>> http://lists.qt-project.org/mailman/listinfo/interest
>
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest



More information about the Interest mailing list