aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/compressedtexture
Commit message (Collapse)AuthorAgeFilesLines
* Fix: do data size check of pkm format compressed texture filesEirik Aavitsland2018-02-281-3/+2
| | | | | | | | | | Reintroduce reading - and sanity checking - the data size from the file header of pkm files. This was commented out during the refactoring, since it lacked the fix for ETC2_EAC format (ref. 16cd1f8 on 5.10 branch). This commit also includes that fix. Change-Id: Id85547fb6bee254d58e49ddff4593704f7ab83ed Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Fix memory leak in compressed texture file readingEirik Aavitsland2018-02-271-0/+1
| | | | | | | The format handler object would never be deleted. Change-Id: I44e0740f8ab0404ebb2951865bfedc5a4c8227f3 Reviewed-by: Michael Brasser <michael.brasser@live.com>
* use nullptr consistently (clang-tidy)Shawn Rutledge2018-02-261-3/+3
| | | | | | | | | | | | | From now on we prefer nullptr instead of 0 to clarify cases where we are assigning or testing a pointer rather than a numeric zero. Also, replaced cases where 0 was passed as Qt::KeyboardModifiers with Qt::NoModifier (clang-tidy replaced them with nullptr, which waas wrong, so it was just as well to make the tests more readable rather than to revert those lines). Change-Id: I4735d35e4d9f42db5216862ce091429eadc6e65d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Add basic handler for ktx format texture filesEirik Aavitsland2018-02-012-0/+264
| | | | | | | | This adds basic support for reading compressed textures stored in .ktx files, the Khronos texture file format. Change-Id: Iafb86cff9607eedb26a73989f9b005455ddd316f Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Basic working compressed texture atlasMichael Brasser2018-01-314-1/+306
| | | | | | | | | | | | | This adds experimental automatic atlasing of ETC-compressed textures (to be expanded to additional formats), similar to existing atlas support of QImages. It is off by default, and can be enabled with QSG_ENABLE_COMPRESSED_ATLAS=1. [ChangeLog] Add experimental automatic atlasing of ETC-compressed textures (can be enabled with QSG_ENABLE_COMPRESSED_ATLAS=1) Change-Id: Ia66971f51299d082a569bdfaadb662a3e522bd79 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Refactor compressed texture file readingEirik Aavitsland2018-01-275-159/+487
| | | | | | | | | | | | | | This commit expands on the basic support for compressed texture files that was added in 432e27a. It prepares for adding support for other file types than pkm by declaring a common QSGTextureFileHandler interface, and by factoring out reusable code parts in a new QSGCompressedTexture class. It also adds some more systematic logging and checking for error conditions. Change-Id: Ie5070d0a6df757fee0753f53adbe23a33d51a634 Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Fix symbol clash in static builds in etc texture providerSimon Hausmann2017-08-252-10/+10
| | | | | | | | | All symbols must be prefixed with Q to avoid clashes with user code when linking statically. Task-number: QTBUG-62772 Change-Id: Ib4d44ad2db3053fc8dba3235ee2774774a38bf6c Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Add very basic compressed texture supportMichael Brasser2017-08-072-0/+303
Allow direct loading of pkm texture files into Image. This can be extended to additional texture types, and then eventually turned into a full plugin architexture. [ChangeLog][Qt Quick] Allow direct loading of pkm texture files into Image. For example: Image { source: "myImage.pkm" } Change-Id: I1baed6c3e85a15752da8adc675482d874c9355ab Task-number: QTBUG-59872 Task-number: QTBUG-29451 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>