[Interest] PVRTC textures in Qt Quick 2?

Gunnar Sletta gunnar.sletta at jolla.com
Tue Jan 21 07:55:37 CET 2014


On 20 Jan 2014, at 16:04, Ola Røer Thorsen <ola at silentwings.no> wrote:

> 2014/1/20 Gunnar Sletta <gunnar.sletta at jolla.com>
> You can install a custom image provider that provides the PowerVR texture directly as a QSGTexture. In the scenegraph playground repository there is already a plugin that does this for AMD compressed textures. You can use that as a basis for your code.
> 
> https://qt.gitorious.org/qtplayground/scenegraph/source/6379165f6ae63c3a73a62b8fa3845cc299449827:imageproviders/amd_compressed_atc_texture
> 
> 
> Ah, brilliant! :-) Thanks!
> 
> I guess compressed textures can't be added to the regular texture atlas? Is it possible to create a QSGTexture pointing to a custom texture atlas instead? I could return custom QSGTextures re-implementing normalizedTextureSubRect?

If you copy a compressed texture into a non-compressed texture it will no longer be compressed :)

QSGTexture supports atlasses though, so you can have your custom image provider return subtextures of your compressed texture. For instance, by letting each key map to a different subrect and use QSGTexture::normalizedTextureSubRect() to specify the bounds.

> 
> Cheers,
> Ola
> 




More information about the Interest mailing list