summaryrefslogtreecommitdiffstats
path: root/src/gui/opengl
Commit message (Collapse)AuthorAgeFilesLines
* Doc: Link to external docs in QOpenGLFunctions_* classesTopi Reinio2013-09-0923-22/+114
| | | | | | | | | | | These are wrapper classes that do not document their functions. This change adds links to docs on opengl.org / khronos.org where suitable, and changes the \brief commands to mention the correct OpenGL version/profile. Change-Id: I48154d5bce26f6753ca4400962939847c78a527d Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-08-271-1/+1
|\ | | | | | | | | | | | | Conflicts: examples/widgets/doc/src/addressbook-fr.qdoc Change-Id: Id1196e8e0c6445f1616c3f29234c974d809f8e48
| * Ensure the docs for QOpenGLFunctions_ES2 are generatedThiago Macieira2013-08-231-1/+1
| | | | | | | | | | | | | | | | | | | | qdoc runs the preprocessor, so it probably skipped the definition for this class. Change-Id: I10933134d0c20131dd25e15bee914ebfac358b10 Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: James Turner <james.turner@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-08-143-17/+11
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure mkspecs/macx-xcode/Info.plist.app mkspecs/macx-xcode/Info.plist.lib qmake/doc/qmake.qdocconf src/corelib/global/qglobal.h tests/auto/other/exceptionsafety/exceptionsafety.pro tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp Change-Id: I3c769a4a82dc2e99a12c69123fbf17613fd2ac2a
| * un-confuse lupdate: use #if 0 consistentlyOswald Buddenhagen2013-08-121-1/+3
| | | | | | | | | | | | | | | | | | it's no good idea to #if 0 the opening brace but comment out the closing one. Change-Id: I6f9ca8f14f0dc82fb22df85de547564336ed0476 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
| * Fix typo form->fromStephen Kelly2013-07-311-1/+1
| | | | | | | | | | Change-Id: Ifa47cec0e454228d33c917c0baa6d0686955af5a Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
| * Fix upload of glyphs when using RGB32 masks on OpenGL ESGunnar Sletta2013-07-301-14/+4
| | | | | | | | | | | | | | | | | | | | | | | | OpenGL ES doesn't allow internal format to be different from external format, so always do the conversion from BGRA -> RGBA. We are anyway iterating over all the pixels so the performance impact of this should be minimal. Change-Id: Ie891665ad66e31692b69db02d34be8d303a7d631 Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
| * Add workaround for GL on Android emulatorEskil Abrahamsen Blomfeldt2013-07-291-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | On the Android Emulator, the shaders will be compiled by a desktop GL driver, since the GL driver in the emulator is just a thin wrapper. The GL driver does not necessarily support the precision qualifiers, which can cause applications to break. We detect this at runtime in the platform plugin and set a workaround flag to Task-number: QTBUG-32557 Change-Id: Ied00cfe8e804d1f7862697dd379a14f3bed3d980 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* | Support RGBA image formatAllan Sandfeld Jensen2013-07-231-8/+13
| | | | | | | | | | | | | | | | | | Support the byte-ordered RGBA format which is used by OpenGL, and many endian neutral byte formats. Task-number: QTBUG-32201 Change-Id: I77cffb4c30c69545fa96ded2f537b2ebd9351acb Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
* | Merge branch 'stable' into devSergio Ahumada2013-07-113-14/+64
|\| | | | | | | | | | | | | | | | | | | Conflicts: qmake/generators/mac/pbuilder_pbx.cpp src/corelib/json/qjsonwriter.cpp src/corelib/kernel/qeventdispatcher_blackberry.cpp src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm Change-Id: I24df576c4cbd18fa51b03122f71e32bb83b9028f
| * Restore smooth-scaled drawing of 0.5x-2.0x scaled glyphs in the GL engineTor Arne Vestbø2013-07-081-12/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit b5922c89ba942 (Add support for retina glyph-based text drawing in the GL engine), and commit 155a20628b91 (Use QPaintEngineEx to decide if font is too big for using the glyph cache) together changed the behavior of drawing scaled cached glyphs in the GL engine, producing blocky text drawing when using the FreeType font engine. Whereas before we would cache all glyphs without any transform, and let the paint engine take care of the transform, commit b5922c added support for a scaled GL glyph cache, resulting in a 2x cache, drawn at 1x for example. The problem was that the FreeType engine claimed to support producing glyphs at 2x, but did that using the QFontEngine baseclass implementations, which use a simple fast-transform to scale up the glyphs. The result was a 2x cache with horrible looking glyphs. The first step in fixing this issue was to have the FreeType engine claim to only support translations. This would then make the paint engine choose path-based drawing for all scaled text, which is slow. To restore the optimization that we would draw 0.5x-2.0x scaled text using a smooth-scale in the GL engine (which was removed in 155a206), we then needed to extend shouldDrawCachedGlyphs() and add a special condition for this, coupled with a bit of logic in drawCachedGlyphs() that ensures we don't propagate the painter scale to the glyph cache if the engine is not able to produce scaled glyphs for it. This means we get the old behavior of the GL engine doing a smooth scale of the 1x glyph in the cache. Finally, since the raster engine also checks if the font engine supports the current transform, but for FreeType then ends up in a separate code path when actually drawing the glyphs (as the FreeType font engine supports internal glyph caching), we need to add a corresponding check for hasInternalCaching() in the shouldDrawCachedGlyphs() function, now that the FreeType engine only reports that it supports translations. Change-Id: Id03de896dec5f29535b281fb235332ef018045d8 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
| * Set projection matrix for systems with OpenGL 3.1Wouter Huysentruit2013-07-031-0/+2
| | | | | | | | | | | | | | | | | | | | The projection matrix should also be set for systems running OpenGL 3.1 with GL_ARB_compatibility extension. Task-number: QTBUG-28284 Change-Id: I756155a6064dcbff29fd817e676d31f24f559e8c Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2013-06-282-2/+26
| |\ | | | | | | | | | Change-Id: I53112e20a65b7d706755b4a22622979f3b91a2c2
| | * Avoid crash when QOpenGLContext is destroyed before the VAOSean Harmer2013-06-282-2/+26
| | | | | | | | | | | | | | | | | | | | | Change-Id: I19df59453156a95c5075a065268333a74cec2476 Reviewed-by: James Turner <james.turner@kdab.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* | | Add a way to test if an OpenGL context has the fixed function pipeline availableGiuseppe D'Angelo2013-07-022-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | Due to the mess done in 3.0/3.1 this is trickier than it should be, so add a convenience method to test that. Change-Id: I26d77cc8f109820cca3f578c3fa3520e802dc15f Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | | Fix documentation of the QOpenGLFunctions::OpenGLFeature enumGiuseppe D'Angelo2013-07-021-2/+2
|/ / | | | | | | | | | | | | | | | | | | | | | | It's not really about features already present in OpenGL ES 2 that might not be present in other OpenGL implementations; for instance, NPOT textures are not in ES 2, but only available through extensions. Therefore, change the wording to include optional OpenGL and OpenGL ES features. Change-Id: I3822e50789ded10a937e3c5b7b4be9e267265276 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2013-06-121-0/+1
|\| | | | | | | Change-Id: If29ca1b27da4592d40a7678837c359f75dac1209
| * Doc: Mark QOpenGLFunctions_4_1_Core as a wrapper classTopi Reinio2013-06-101-0/+1
| | | | | | | | | | | | | | | | | | The class documentation missing the \wrapper command, making QDoc complain a lot. Change-Id: Iad8fa3d2facadfb3393642dc08ff4dc416bdccc7 Reviewed-by: Martin Smith <martin.smith@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* | doc: QOpenGLFramebufferObject::bindDefault() was marked internalMartin Smith2013-06-111-1/+0
| | | | | | | | | | | | | | | | The \internal was removed. Task-number: QTBUG-31645 Change-Id: I98b57ec3816b6d9c49e3488accb65f147aeb15f1 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* | Fix FBO restoring in QOpenGLTextureGlyphCacheValery Volgutov2013-06-051-1/+4
|/ | | | | | | | | | | | | | | | QOpenGLTextureGlyphCache::restoreTextureData restores FBO which was binded before restoreTextureData call. More specifically, it restores QOpenGLContextPrivate's current_fbo member. This works if FBO was binded by QOpenGLFramebufferObject but not if FBO was binded using glBindFramebufferObject and rendering done via QOpenGLPaintDevice. This patch fixes it by querying current FBO using GL_FRAMEBUFFER_BINDING query and restoring it. Change-Id: Ia97a21e62566dc39a5191b66d3ca0e3ad0845ce1 Reviewed-by: Valery Volgutov <valery.volgutov@lge.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Prevent QOpenGLShaderProgram::link() from showing unnecessary warnings.Samuel Rødal2013-05-241-5/+7
| | | | | | | | | | | | | | | If the liking didn't fail there's no need to print out warnings. The warnings can still be accessed by the application after calling link() through the log() function. This prevents warnings such as these from appearing: QOpenGLShader::link: "No errors." Task-number: QTBUG-31326 Change-Id: I03c9be5dfada8822c3ab1c3610eac2fc0a91410b Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* qdoc: The \wrapper command is addedMartin Smith2013-05-0722-0/+22
| | | | | | | | | | | | | | | | | | If \wrapper appears in a \class comment or a \qmltype comment, qdoc will not print warnings when it finds public members of the class or the QML type that are not documented. The \wrapper command is added to several opengl classes. This reduces the number of qdoc warnings by several thousands. Task-number: QTBUG-30755 Change-Id: Iba1eebc1590ccf54100e40fe91423240c1b3d09d Reviewed-by: Topi Reiniö <topi.reinio@digia.com> Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com> Reviewed-by: Martin Smith <martin.smith@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Don't use GL_REPEAT for image-brush drawing on OpenGL ES2Tor Arne Vestbø2013-05-071-1/+9
| | | | | | | | | | | | | | | | | OpenGL ES2 doesn't support NPOT textures in combination with GL_REPEAT, so for OpenGL ES2 we use a custom program that emulates repeat by taking the fractional part of the texture coordinates. This is not enough though, as merely setting GL_TEXTURE_WRAP_x to GL_REPEAT with a NPOT texture is an error in some implementations, so we have to guard the call to updateTextureFilter() in updateBrushTexture() with a check for OpenGL ES2 and use GL_CLAMP_TO_EDGE instead. This fixes missing/black backgrounds in the diagramscene example on iOS. Change-Id: I5020090b5f17faeb06dcab9dc0292459e021af30 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Fix header check: you must #include qconfig.h before QT_NO_OPENGLThiago Macieira2013-04-232-0/+4
| | | | | Change-Id: I50518bd1b721d19e4712a6c11afb0a93afeaa7ea Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Fix memory leak.Sérgio Martins2013-04-181-0/+2
| | | | | | Change-Id: I7d308a869fdc729bd46ace336b71c7e30556d65d Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* QOpenGLPaintDevice: correct painting on retina.Morten Johan Sørvig2013-04-181-1/+1
| | | | | | | | Make QOpenGLPaintDevice::metric(PdmDevicePixelRatio) return d->devicePixelRatio instead of 1. Change-Id: I4cf9dd552a700b958212edc8efb990a45e77fd66 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* Add default value for qHash's 'seed' argument for QOpenGLVersionProfile/StatusTor Arne Vestbø2013-04-151-1/+1
| | | | | | | | | | | | | | | | Although template<typename T> inline uint qHash(const T &t, uint seed) from qhash.h is never instantiated because we have the two-argument version of qHash() for both QOpenGLVersionProfile and QOpenGLVersionStatus, we need the default argument, as the template in qhash.h uses noexcept, which is evaluated regardless of instantiation, and uses qHash(t) without a seed. This behavior seems to not be the case with Apple clang 4.2, but has been observed with Apple clang 4.1, Clang 3.2, and GCC 4.8. Change-Id: If70e93f64eb9675a7c3ef7897ced2c6aebbec2d6 Reviewed-by: Eike Ziller <eike.ziller@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Add devicePixelRatio metric to QPaintDevice.Morten Johan Sørvig2013-04-151-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Previously QPainter computed the devicePixelRatio based on the physical and logical dpi, and expected that the ratio between them would be either 1x or 2x. This was problematic for paint devices like printers where the physical dpi can be much higher than the logical dpi, and also for QScreen where the physical dpi would have to be defined as a multiple of the logical dpi. Add QPaintDevice::PdmDevicePixelRatio and QPaintDevice:: devicePixelRatio() getter and implement it for the QPaintDevice subclasses. Use it when calculating the highdpi scale transform in qpainter.cpp and when scaling the clip rect in qwidget.cpp. Remove physical dpi scaling for QImage, QPixmap and QOpenGLPaintDevice, reverting to the old behavior. Change-Id: I6c97510613196d4536ff39d08e9750b8782283d4 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Fix incorrect classification of glTexImage3D.Sean Harmer2013-04-0522-80/+122
| | | | | | | | | See https://www.khronos.org/bugzilla/show_bug.cgi?id=449 for upstream bug in gl.spec which incorrectly marks glTexImage3D as deprecated. Change-Id: Ib307a5315dd37b8b18389df54b1c93e6a43c61dd Reviewed-by: James Turner <james.turner@kdab.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Fix build on iOS by using QOPENGLF_APIENTRY intead of APIENTRY directlyTor Arne Vestbø2013-03-191-1/+1
| | | | | | | | QOPENGLF_APIENTRY masks over GL vs ES, as we need GL_APIENTRY on iOS, where APIENTRY is not defined. Change-Id: I60c097d67e0844c30913c913cf88a9b9e181813b Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Make sure that we #include qconfig.h before testing for features.Thiago Macieira2013-03-197-3/+14
| | | | | | | | | | | This is mandatory in public headers (qiodevice.h, qopengl*, etc.), but it's a good idea even in private headers, in case someone includes that header first somewhere. In particular, all platformsupport API is private. Change-Id: If287baa5d9ed14e93c1666efa0e6332c4c1cd9a4 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Whitespace cleanup: remove trailing whitespaceAxel Waggershauser2013-03-164-45/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | Remove all trailing whitespace from the following list of files: *.cpp *.h *.conf *.qdoc *.pro *.pri *.mm *.rc *.pl *.qps *.xpm *.txt *README excluding 3rdparty, test-data and auto generated code. Note A): the only non 3rdparty c++-files that still have trailing whitespace after this change are: * src/corelib/codecs/cp949codetbl_p.h * src/corelib/codecs/qjpunicode.cpp * src/corelib/codecs/qbig5codec.cpp * src/corelib/xml/qxmlstream_p.h * src/tools/qdoc/qmlparser/qqmljsgrammar.cpp * src/tools/uic/ui4.cpp * tests/auto/other/qtokenautomaton/tokenizers/* * tests/benchmarks/corelib/tools/qstring/data.cpp * util/lexgen/tokenizer.cpp Note B): in about 30 files some overlapping 'leading tab' and 'TAB character in non-leading whitespace' issues have been fixed to make the sanity bot happy. Plus some general ws-fixes here and there as asked for during review. Change-Id: Ia713113c34d82442d6ce4d93d8b1cf545075d11d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Long live QOpenGLDebug!Giuseppe D'Angelo2013-03-153-2/+2030
| | | | | | | | | | | Qt convenience classes for the GL_KHR_debug extension This allows the developer to 1) ask the GL for a log of the last generated messages; 2) emit Qt signals whenever the GL wants to tell us something. Change-Id: I830343a26714c51abb68ce1269163c145d1e2aac Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Fix calling convention in ANGLE builds on WindowsSean Harmer2013-03-151-3/+5
| | | | | | | | | | | | | | Desktop OpenGL builds on windows correctly define APIENTRY whereas at present the ES2 (ANGLE) builds do not. This leads to QOPENGLF_APIENTRY having the wrong calling convention. This fix is required for https://codereview.qt-project.org/#change,48660 but may also fix any random crashes that people may be seeing with other Qt-wrapped OpenGL functions in ANGLE builds. Change-Id: I8068c181d41be949d29168bd5ca1a181cc2245c7 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Don't include custom qopengles2ext.h on iOSTor Arne Vestbø2013-03-131-21/+32
| | | | | | | | | | | | | | | This fixes the build after ec9c0faefd (Update gl2ext.h with the latest version from Khronos). Just like Mac OS X, iOS is a controlled platform, and we should include the system headers instead. The OES_EGL_image_external extension is not yet in the system headers though, so we provide our own typedef to make the qopenglextensions.cpp code build, and the extension will work out of the box once Apple includes driver support for it. Change-Id: Ib6ba09d400ba38f05d91c90d4c9e54a8626889e1 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Avoid crash in QVertexArrayObject destructorSean Harmer2013-03-121-1/+2
| | | | | | Change-Id: If43c7b1cfdee504171a26b07db2ade9c20528299 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Add QOpenGLTimerQuery and QOpenGLTimeMonitor classesSean Harmer2013-03-124-3/+1174
| | | | | | | | | | | | | QOpenGLTimerQuery encapsulates a single OpenGL timer query object. QOpenGLTimeMonitor is a convenience wrapper around a sequence of OpenGL timer query objects that can be used to profile OpenGL rendering code or to allow real-time adaptation of rendering methods based upon run-time performance. Change-Id: I873e591927080dea2b079b0e2a1eb9fed15c0372 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com> Reviewed-by: James Turner <james.turner@kdab.com>
* Update gl2ext.h with the latest version from KhronosGiuseppe D'Angelo2013-03-121-20/+461
| | | | | | | | | | This adds (amongst other things) the support for the GL_KHR_debug extension, which is required by QOpenGLDebug classes. Change-Id: Id8b80968807e4f3db7eebd8cc9d9beae23b5d7e2 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Make the new OpenGL function headers compile on their ownThiago Macieira2013-03-0523-46/+92
| | | | | | | | | | | | You can't use #ifndef QT_NO_OPENGL before including whatever is supposed to define that. That's qconfig.h, included by qglobal.h. Also, make sure that the desktop OpenGL code isn't activated when compiling in OpenGL ES 2 mode -- QOpenGLFunctions_1_0_CoreBackend and other classes aren't defined. Change-Id: I127edf56d42257580579789d0566b7e11c21133b Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Mark all qtbase headers that aren't cleanThiago Macieira2013-03-032-0/+2
| | | | | | | | | | | | | | | | QtCore has a few headers that, though public, aren't meant to be included directly. Those are the atomic headers, the three _impl.h headers and qt_windows.h. QtGui includes two OpenGL headers that don't compile on their own. Other libraries should not have headers like that (but they do, something we need to fix eventually). Change-Id: I55e4eb057748f47df927ee618f9409acbc189cc1 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* OpenGL: Add support for the Compute shader stageSean Harmer2013-03-023-2/+17
| | | | | Change-Id: Ibb1b79358758c2adf818af8c6fcd5c379efad8c3 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* QOpenGLShaderProgram: insert precision defines based on runtime detectionGiuseppe D'Angelo2013-03-011-10/+14
| | | | | | | | | | | Given that we can create OpenGL/ES contexts even under a Desktop OpenGL implementation, we must check the type of the surface we're renderering on at runtime. Change-Id: I55004ce918889b3fc094702976500fcfc675bd1a Reviewed-by: Samuel Rødal <samuel.rodal@digia.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* OpenGL: Add support for OpenGL 4 tessellation shader stagesSean Harmer2013-03-013-7/+247
| | | | | | | | | | This adds support for OpenGL 4 tessellation shader stages to QOpenGLShaderProgram and QOpenGLShader. Change-Id: Iefb2f411e00767990d54670c5d39413be694dd66 Reviewed-by: James Turner <james.turner@kdab.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Merge "Merge branch 'ios' into dev" into refs/staging/devTor Arne Vestbø2013-02-282-2/+13
|\
| * iOS: Retina display support.Morten Johan Sorvig2013-02-272-2/+13
| | | | | | | | | | | | | | | | Scale the OpenGL paint device size and physical dpi by the device pixel ratio. Change-Id: I8b576f23129aafc47371795151c548663e94ad52 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* | OpenGL: Add QOpenGLVertexArrayObject classSean Harmer2013-02-283-2/+586
| | | | | | | | | | | | | | | | | | | | This class makes it much simpler to manage OpenGL state relating to vertex data (i.e. vertex buffer objects, vertex attribute divisors, index buffer objects, vertex buffer formats). Change-Id: I9fb932cc3f0691ec9ba065bf871e43cd2e369bad Reviewed-by: James Turner <james.turner@kdab.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* | OpenGL: Reinstate support for OpenGL geometry shadersSean Harmer2013-02-283-4/+58
| | | | | | | | | | | | | | | | | | Unlike QGLShader, this requires the OpenGL 3.2 core implementation of geometry shaders to keep the API simple. Change-Id: Icb07f430c4c5b5d950bcf6f7119becec4cfaad8a Reviewed-by: James Turner <james.turner@kdab.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* | OpenGL: Add a set of version and context specific OpenGL classesSean Harmer2013-02-2652-2/+85303
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds part of the output of utils/glgen and some simple modifications to QOpenGLContext to allow easy access to classes containing functions specific to a given OpenGL context and version. This allows compile-time detection of mis-use of OpenGL features. For example, trying to use glBegin(GL_TRIANGLES) with an OpenGL 3.2 Core Profile context will be detected by the compiler rather than at runtime. These capabilities make it much easier to add functionality to Qt and applications that relies upon core features of OpenGL from specific versions e.g. geometry shaders. Change-Id: Ieb584a489792595f831bc77dee84935c03bb5a64 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* | Update qopenglext.h with the latest version from KhronosGiuseppe D'Angelo2013-02-251-32/+434
|/ | | | | | Change-Id: I84b051b30623fda67c89d4d6b0b7756681cb9011 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Update qopenglext.h to latest glext.h from Khronos.orgSean Harmer2013-02-221-99/+1016
| | | | | | | | This now includes support for OpenGL 4.3 Change-Id: I964284843dffe806280e7f67cde67f17e84dc6df Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>