summaryrefslogtreecommitdiffstats
path: root/src/corelib/itemmodels
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2014-11-13 11:36:33 +0100
committerGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2014-11-13 12:45:03 +0100
commit279317b0673438a3ede3fe38d1c68c7f7ecc5c5f (patch)
treed981c394e8594a366f317584780d91cd3d45ae15 /src/corelib/itemmodels
parent10d1b6c7b842c2500f25f21bbff96b6da4caeccb (diff)
QOpenGLTexture: fix storage allocation
Storage allocation was quite wrong in the general case. 1) We can't pass unsized texture formats to immutable storage allocations, so we need to check for that. 2) Second, when allocating mutable storage on GLES, apparently the driver is allowed to peek at the external pixel type. The texture can then only get data in the pixel type passed at storage allocation time. (I guess that, for the sake of simplicity, the drivers are allowed not to perform any pixel conversions.) I'm still not convinced about the wording in the GLES2/3 specifications, but apparently ANGLE behaves this way, so we need to fix this kind of allocation. Unfortunately the only way is to ask, at storage allocation time, what's the external pixel format/type, so we need to introduce an allocateStorage overload taking those as arguments and using them for the glTexImage* calls. Task-number: QTBUG-41822 Task-number: QTBUG-42623 Change-Id: Idf745d549f01c5db3e56e86cf9b1f53a77cfccc6 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/corelib/itemmodels')
0 files changed, 0 insertions, 0 deletions