[Interest] [Qt3D] Custom texture loader and material shaders

Xavier Bigand flamaros.xavier at gmail.com
Mon Jun 20 17:37:14 CEST 2016


I just put a QHash table to return the previous
generated Qt3DRender::QTextureImageDataPtr, but it doesn't work.

Need I fill a bug for this?

2016-06-20 17:15 GMT+02:00 Xavier Bigand <flamaros.xavier at gmail.com>:

> I took a look with nsight and it appears that my textures are currently
> loaded many times, certainly one for each object instance.
>
> Need I manage textures resources my self?
>
>
>
> 2016-06-02 20:39 GMT+02:00 Xavier Bigand <flamaros.xavier at gmail.com>:
>
>> I forgot to precise that mipmaps are already generated in our file format
>> and texture compressed (PVRTC, DXTC,...)
>>
>> 2016-06-02 18:41 GMT+02:00 Xavier Bigand <flamaros.xavier at gmail.com>:
>>
>>> Hi,
>>>
>>> I finally come back into Qt3D tests.
>>>
>>> For the texture loader, I made my own QAbstractTextureImage
>>> and QTextureDataFunctor, I do the loading of our files in the override
>>> of QTexImageDataPtr operator ()().
>>> But I don't understand how to give to Qt3D texture's format, mipmaps,...
>>> because I can set only buffer, pixelType and pixelFormat on QTexImageData
>>> class.
>>>
>>>
>>> Need I also implement my own QAbstractTextureProvider functor to
>>> provide other properties?
>>>
>>>
>>> 2016-03-28 10:45 GMT+02:00 Sean Harmer <sh at theharmers.co.uk>:
>>>
>>>> Hi,
>>>>
>>>> sorry, forgot to reply to the texture part.
>>>>
>>>> On 27/03/2016 23:53, Xavier Bigand wrote:
>>>>
>>>> Hi,
>>>>
>>>> Is there a way to add a loader for our custom texture format?
>>>>
>>>>
>>>> I think you can use the functor approach exposed by
>>>> QAbstractTextureProvider or QAbstractTextureImage.
>>>>
>>>> Cheers,
>>>>
>>>> Sean
>>>>
>>>>
>>>> We also have to use our existing shaders for materials, but I don't
>>>> know how to manage uniforms. We are generating our shaders based on macros
>>>> depending of the number and types of light sources,..., is it possible to
>>>> keep that?
>>>>
>>>> --
>>>> Xavier
>>>>
>>>>
>>>> _______________________________________________
>>>> Interest mailing listInterest at qt-project.orghttp://lists.qt-project.org/mailman/listinfo/interest
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Interest mailing list
>>>> Interest at qt-project.org
>>>> http://lists.qt-project.org/mailman/listinfo/interest
>>>>
>>>>
>>>
>>>
>>> --
>>> Xavier
>>>
>>
>>
>>
>> --
>> Xavier
>>
>
>
>
> --
> Xavier
>



-- 
Xavier
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20160620/341cac32/attachment.html>


More information about the Interest mailing list