summaryrefslogtreecommitdiffstats
path: root/src/gui/opengl/qopengltexture_p.h
Commit message (Collapse)AuthorAgeFilesLines
* QOpenGLTexture::setData add overloads to allow specifying sub imagesPaul Lemire2019-02-271-0/+4
| | | | | | | | | | All current setData implementation only allow to specify a full size sub image for a given mip level. In some cases, we might only want to update a small region on an image, in which cases being able to specify the x, y, z offsets as well as the dimensions is required. Change-Id: I880cfcc67a814733e8ab880aa8766c87b7bc7e45 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Add new APIs which is useful to upload more than one layer at onceBogDan Vatra2017-01-041-2/+3
| | | | | | | | | It's useful to upload textures storred in .KTX files without dividing the layers. It's also more efficient than uploading layer by layer. Change-Id: I92d93c57514e2a3637d1202cb83bd72b8d277edf Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Add qtguiglobal.h and qtguiglobal_p.hLars Knoll2016-07-031-0/+1
| | | | | | | | | | | | | | | | | | | | The new modular configuration system requires one global header per module, that is included by all other files in this module. A similar scheme and naming convention is already being used for many other modules (e.g. printsupport, qml, quick). That header will later on #include the configuration file for Qt Gui. For now it defines the Q_GUI_EXPORT macro for this library. In addition, add a private global header, qtguiglobal_p.h, that can later on include the private config header for Qt Gui for things we don't want to export to the world. Change-Id: Id9ce2a4f3d2962c3592c35e3d080574789195f24 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Don't resolve GL 1 symbols in the texture helperLars Knoll2016-03-011-0/+2
| | | | | | | | | We already have these symbols resolved in QOpenGLFunctions, so simply use those. Change-Id: I6047181dbe47be9b0a83656af454d0ca1f3df6eb Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Updated license headersJani Heikkinen2016-01-151-13/+19
| | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* QOpenGLTexturePrivate: remove unused member variableGiuseppe D'Angelo2015-12-161-1/+0
| | | | | Change-Id: I4d897c522087654649547c0ca4750ba4dbfa5cbf Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Make compressed textures work with mutable storageLaszlo Agocs2015-08-081-0/+2
| | | | | | | | | | | | | | | | | | 1. glTexImage*D does not accept compressed formats. 2. Replacing it with glCompressedTexImage*D is not an option as per GLES 2.0 spec since passing null data is not allowed. 3. glCompressedTexSubImage*D must always be preceded by a glCompressedTexImage*d (or glTexStorage*D) call. 4. Therefore the only way is to do nothing in allocateStorage() and switch to glCompressedTexImage*D in setCompressedData() whenever mutable storage is in use. This makes ETC1 textures working on the Beaglebone (and presumably others). Change-Id: I21a040f6ed4aecaa494b6e5a6c6cd75b7389c15c Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Update copyright headersJani Heikkinen2015-02-111-6/+6
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* QOpenGLTexture: introduce texture comparison supportGiuseppe D'Angelo2015-01-171-0/+2
| | | | | | | | Shadow sampling is an old OpenGL feature (hello, OpenGL 1.3!), which was missing from QOpenGLTexture. This commit adds the relevant support. Change-Id: I9f6b552d806a356d24ee08121af6bc9ce684f2b5 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QOpenGLTexture: fix storage allocationGiuseppe D'Angelo2014-11-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Update license headers and add new license filesMatti Paaso2014-09-241-18/+10
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Add missing private headers warningSamuel Gaist2014-09-041-0/+11
| | | | | Change-Id: I7a4dd22ea3bcebf4c3ec3ad731628fd8f3c247e0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QOpenGLTexture: Introduce const void * image upload methodsGiuseppe D'Angelo2014-01-311-2/+2
| | | | | | | | | | An API oversight caused the image upload methods to take a "void *", which is not necessary at all. The underlying texture uploading calls (i.e. the gl(Compressed)Tex(Sub)Image<N>D family) all take a "const void *". The methods taking a "void *" get deprecated. Change-Id: Idfda58d4d7d0af1f335e5cbad7d700f4ccad652c Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Long live QOpenGLTexture!Sean Harmer2013-09-221-0/+164
Task-number: QTBUG-33274 Change-Id: I9259d947d11f8ba330a2cd7f5620d8f1af0a804b Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>