Status: In Progress
Priority: P2: Important
Affects Version/s: 5.9, 5.10, 5.11
Fix Version/s: None
Have code like this:
then try to query width(), height(), and others from texture or the texture image. The result (at least for width and height) is always 1.
Not reporting the actual width and height is a dealbreaker for some cases. For example, imagine a shader that expects data derived from the texture size as its input. Or, any debug/profile view that tries to report the sizes of the textures used.
Update: I realized in the meantime that QTextureLoader works fine and that will update width and height as expected.
Update2: actually, QTextureLoader is still a problem when the same file is referenced by multiple QTextureLoaders. In that case only the first one (that does the actual file loading) gets updated property values, the others are stuck with 1x1 etc.
The ideal solution would be to get up-to-date values for width, height, etc., and introducing a new flag indicating if the texture uses shared data under the hood (keeping in mind that two QTextureLoaders with the same source lead to reusing the data itself but will still generate two separate textures if some texture parameters (say wrap mode) differ)