summaryrefslogtreecommitdiffstats
path: root/examples/opengl
Commit message (Collapse)AuthorAgeFilesLines
...
* Make qopenglwidget example functional without timers tooLaszlo Agocs2014-09-303-1/+34
| | | | | Change-Id: I6a89eaf794202c45a5ad3152d304e46041704730 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* hellowindow: Set all the state for each frameLaszlo Agocs2014-09-041-12/+15
| | | | | | | | | | | Trying to be smart and minimizing the amount of GL calls per frame to provide a good example was a mistake (in a way): There are components, like the eglfs mouse cursor, that change the context state. To make sure the example work in these cases, set the state upon each frame. Change-Id: Ief1fd7bbb0fb1955a64dac97a071b7a3d9d506d4 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* Use QMenuBar::addMenu in the qopenglwidget exampleLaszlo Agocs2014-08-251-6/+3
| | | | | | | | | | Like in all other places. This way the resulting QMenu is correctly parented so it will show up at the proper position even on platforms which do not have a way to position top-level windows. Task-number: QTBUG-29025 Change-Id: I2aa6fe73699379029c44a3f379366a2133753190 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* Set a size in qopenglwindow exampleLaszlo Agocs2014-08-241-1/+1
| | | | | | | | Use showMaximized(). Just calling show() without setting a size can result in a zero-sized, invisible window on some platforms. Change-Id: Ifa48258060e3d651c2fac3a1409a26a2c3db6bdb Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* Avoid transparency in qopenglwindow exampleLaszlo Agocs2014-08-142-2/+3
| | | | | | | | | On systems that give alpha configs by default writing alpha values of less than 1.0 is a bad idea since it will lead to the content behind the window becoming visible, even though this is not the example's intention. Change-Id: I23cdfc1fb78d77b1cbc192d2aba5d6665a7acfcc Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Fix composition for windows with alphaLaszlo Agocs2014-08-132-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | While we will cover the entire surface with our textured quads, the clear is still necessary in order to make top-levels with TranslucentBackground render correctly: We don't want to blend transparent areas with undefined content that is in the surface's framebuffer. Blending is problematic for alpha values. We now prevent the blended alpha from being written out. This ensures that in examples like qquickviewcomparison, where the backingstore image contains an alpha of 0.5 while the QQuickWidget texture 1.0, the result is still an alpha value of 1.0 in the final image. Writing out an alpha of 0.5 would break on systems where windows get an alpha buffer by default. hellogl2 can now take a --transparent parameter which makes the QOpenGLWidget being cleared to transparent in order to verify it works in combination with Qt::WA_TranslucentBackground. The swapped red and blue problem is also corrected. RGBA8888 does not need swizzling. The only format that needs this is RGB32. Task-number: QTBUG-40716 Change-Id: I54a9fd3a91a1b59575b38cdb908835315514e40f Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* Modernize the OpenGL examplesLaszlo Agocs2014-08-12103-1163/+1595
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change them to use QOpenGLWidget and QOpenGLTexture. Advocate also the usage of VBOs. Hopeless examples, that rely on the fixed pipeline and will not compile or work in ES and dynamic builds, are moved to a "legacy" directory. The documentation pages for these are removed. This long due change avoids the confusion newcomers experience when trying to get started with Qt 5 and OpenGL. hellowindow's behavior is changed to open a single window only by default. The old default behavior, that opened three windows on platforms that supported both MultipleWindows & ThreadedOpenGL, can be requested by passing --multiple. --single is removed since it is the default now. This plays much nicer with drivers that have issues with threading. In addition, say hello to hellogl2. This is the old hellogl example updated to use QOpenGLWidget and OpenGL 2. It also has a mainwindow with multiple (un)dockable widgets containing the OpenGL widgets. This helps testing the behavior when the top-level of the QOpenGLWidget changes and provides a very important example of how to do proper resource management in this case. (must use aboutToBeDestroyed() of the context, since the context goes away and is replaced by a new one on every dock/undock) As a bonus, the logo is now real 3D, no more orthographic nonsense. Launch with --multisample to request 4x MSAA. Launch with --coreprofile to request 3.2 Core. In this particular example the shaders are present in both versions and there is a VAO so the application is functional with core profile contexts. Change-Id: Id780a80cb0708ef164cc172450ed74050f065596 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Clean up the QOpenGLWindow exampleLaszlo Agocs2014-08-073-82/+116
| | | | | | | | | 1. Use includes without module prefixes, as is the custom in examples. 2. No inline functions to make it more readable. 3. Pause animation on pressing P and document our signal connection a bit more. Change-Id: I68dc3d4c74b639cf3fec17b63b7f49626db58bdb Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Add missing precision qualifiers in qopenglwindow exampleLaszlo Agocs2014-08-071-6/+6
| | | | | | | Make GLES implementations happy. Change-Id: Ib389e379f23794eee0fa71ca26b863e56cee662e Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Introduce QOpenGLWindowLaszlo Agocs2014-08-057-2/+486
| | | | | | | | | | | [ChangeLog] Added QOpenGLWindow. This serves as a convenience class for creating windows showing OpenGL content via an API similar to QGLWidget and without any widget dependencies. Done-with: Jorgen Lind <jorgen.lind@digia.com> Task-number: QTBUG-36899 Change-Id: I52e9bc61acb129dbfd3841b3adeffab2dbcf7f05 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Make QOpenGLWidget publicLaszlo Agocs2014-08-0119-184/+941
| | | | | | | | | | | | | | | | | | | | | | | | | | | QOpenGLWidget is now public. In addition Qt::WA_AlwaysStackOnTop is introduced to support the special case of semi-transparent QOpenGLWidget or QQuickWidget on top of regular widgets. hellogl_es2 becomes the qopenglwidget example. This example performs painting both via QPainter and native GL commands and has the OpenGL widget combined with other, normal widgets. The widget stack receives some changes when it comes to renderToTexture widgets like QQuickWidget and QOpenGLWidget. Calling update() will now result in a paint event, which is essential for QOpenGLWidget since we want it to behave like a regular widget. The dirty region handling is extended specially for such widgets due to performance reasons. (an OpenGL content update must not result in any backingstore painting, and is thus handled as a different kind of dirtiness) [ChangeLog] Added QOpenGLWidget. This widget serves as a replacement for QGLWidget. Task-number: QTBUG-36899 Task-number: QTBUG-40086 Change-Id: Ibf7f82fea99b39edfffd2fc088e7e0eadbca25cf Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Make hellogl work properly regardless of vsyncLaszlo Agocs2014-07-312-7/+21
| | | | | | Task-number: QTBUG-39370 Change-Id: I5b7acb8367f18bfa9318c292657ff7fa0f21f664 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Examples: Add Q_DECL_OVERRIDE to overridden functionsOlivier Goffart2014-07-1513-55/+55
| | | | | | | | | | | | | | | | | | Q_DECL_OVERRIDE (which expands to 'override' for supported compiler) helps to declare the intent (that it is an overridden function) and force compilation error when there is no such virtual function in the base class. The examples should show the best practice of having it, as it may save the programmer quite some time in case of change of API or typo in the function name or arguments. This change was done automatically with clang-modernize -add-override -override-macros And fixed MSVC compilation by removing inline for TorrentViewDelegate::paint Change-Id: Ice66ae93fae571266f908703d5b8892b2c1ebb1a Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* Fix up examples for dynamic opengl buildsLaszlo Agocs2014-05-124-8/+15
| | | | | | Change-Id: Id311b00fe7783a3175dc1c4a38f627c78c470761 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* purge vestiges of opengl es 1 supportOswald Buddenhagen2014-04-047-479/+5
| | | | | | | | amends 0d5170256c1. Change-Id: Ifa178d38f602bb7c66ef13334673ff47e332af5b Reviewed-by: Jørgen Lind <jorgen.lind@digia.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* contextinfo: Make it more responsive and improve error handlingLaszlo Agocs2014-03-141-2/+7
| | | | | Change-Id: If05cd906edc8b7f1fd4744d8d0a392aeec46a454 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* contextinfo example: Print the format() both for context and surfaceLaszlo Agocs2014-03-142-15/+30
| | | | | | | And make the output a bit nicer. Change-Id: I5f0f82374b6e9f9feca70a60c30967adb35d48ec Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* Remove calls to setlocale in QtOpenGL cube example.Friedemann Kleint2014-03-141-7/+0
| | | | | | | | | | | | This is causing compilation errors on some Windows CE configurations: mainwidget.cpp(130) : error C3861: 'setlocale': identifier not found mainwidget.cpp(149) : error C3861: 'setlocale': identifier not found Change-Id: Ie863cd7c9c53cfef4074dabffe157d9068654a1c Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Build the cube opengl example both for desktop and ESLaszlo Agocs2014-03-071-2/+2
| | | | | | | | | No reason to restrict it to desktop only, the code works on ES2 too. Task-number: QTBUG-35730 Change-Id: I915a88cbf3c95a941d6bafd88ed57fef0b6a25b9 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* Do not attempt to open multiple windows in hellowindow on embeddedLaszlo Agocs2014-03-061-2/+3
| | | | | | | | | | Platforms like eglfs will not allow opening more than one OpenGL-based window. To prevent aborting the hellowindow example when invoked without --single, enhance the capability check to include also WindowManagement in addition to ThreadedOpenGL. Change-Id: I147d90b31d9fd94912c36339d36af3f311aaa874 Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* Extend QOpenGLFunctions with GL1 functionsLaszlo Agocs2014-03-045-21/+27
| | | | | | | | | | | | | | | | | | This introduces the ability to indirectly invoke all common GL1-GLES2 functions via QOpenGLFunctions. The GL1 functions are not yet resolved, since this would not work anyway when linking to an OpenGL implementation directly. However this may change later but that will be a completely internal change without affecting any public APIs. Also migrate some of the opengl examples to use QOpenGLFunctions for everything. Once dynamic GL loading becomes available on some platforms, these examples should continue to function without any changes since they do not anymore invoke any OpenGL functions directly. Task-number: QTBUG-36483 Change-Id: Ie630029651e5a4863a480aac5306edd67ee36813 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* Dynamic GL: remove exporting symbolsLaszlo Agocs2014-03-041-2/+2
| | | | | | | | | | | | | | | | | | | | | Remove the opengl proxy for now. Later it will either be moved into a separate library or replaced by a QOpenGLFunctions-based approach. This means that the -opengl dynamic configuration is not usable for the time being. The rest of the enablers remain in place. The convenience function QOpenGLFunctions::isES() is now moved to QOpenGLContext and is changed to check the renderable type. This is extremely useful since besides supporting dynamic GL it solves also the problem of GL_ARB_ES2_compatibility (i.e. it triggers the real ES path when creating an ES-compatible context with a desktop OpenGL implementation). Task-number: QTBUG-36483 Task-number: QTBUG-37172 Change-Id: I045be3fc16e9043e1528cf48e6bf0903da4fa7ca Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* Add an example for creating OpenGL contextsLaszlo Agocs2014-02-287-1/+800
| | | | | | | | | | | | | | | | | | | Besides serving as an example for performing OpenGL rendering inside a window container in a way that it works across all GL versions, this is an extremely useful tool for developers and users alike since it allows quick and easy checking of what sort of context a particular driver returns for a particular QSurfaceFormat. NB! Depending on the OpenGL driver, some surprises can be expected. The handling of core/compatibility profiles, the fwdcompat bit, the supported GLSL versions, etc. tend to be somewhat different across the different OpenGL implementations. Task-number: QTBUG-37071 Change-Id: Iae4328e66cd0bb19f74a77fefef93ea5a3221e31 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Fix division by zero in hellogl_es2 example.Friedemann Kleint2014-02-241-6/+6
| | | | | | | | Task-number: QTBUG-37027 Change-Id: Id18ee9c44650de9c434a82d3d10cf48e6ba9e78c Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com> Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Dynamic GL switch on WindowsLaszlo Agocs2014-02-142-37/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The patch introduces a new build configuration on Windows which can be requested by passing -opengl dynamic to configure. Platforms other than Windows (including WinRT) are not affected. The existing Angle and desktop configurations are not affected. These continue to function as before and Angle remains the default. In the future, when all modules have added support for the dynamic path, as described below, the default configuration could be changed to be the dynamic one. This would allow providing a single set of binaries in the official builds instead of the current two. When requesting dynamic GL, Angle is built but QT_OPENGL_ES[_2] are never defined. Instead, the code path that has traditionally been desktop GL only becomes the dynamic path that has to do runtime checks. Qt modules and applications are not linked to opengl32.dll or libegl/glesv2.dll in this case. Instead, QtGui exports all necessary egl/egl/gl functions which will, under the hood, forward all requests to a dynamically loaded EGL/WGL/GL implementation. Porting guide (better said, changes needed to prepare your code to work with dynamic GL builds when the fallback to Angle is utilized): 1. In !QT_OPENGL_ES[_2] code branches use QOpenGLFunctions::isES() to differentiate between desktop and ES where needed. Keep in mind that it is the desktop GL header (plus qopenglext.h) that is included, not the GLES one. QtGui's proxy will handle some differences, for example calling glClearDepth will route to glClearDepthf when needed. The built-in eglGetProcAddress is able to retrieve pointers for standard GLES2 functions too so code resolving OpenGL 2 functions will function in any case. 2. QT_CONFIG will contain "opengl" and "dynamicgl" in dynamic builds, but never "angle" or "opengles2". 3. The preprocessor define QT_OPENGL_DYNAMIC is also available in dynamic builds. The usage of this is strongly discouraged and should not be needed anywhere except for QtGui and the platform plugin. 4. Code in need of the library handle can use QOpenGLFunctions::platformGLHandle(). The decision on which library to load is currently based on a simple test that creates a dummy window/context and tries to resolve an OpenGL 2 function. If this fails, it goes for Angle. This seems to work well on Win7 PCs for example that do not have proper graphics drivers providing OpenGL installed but are D3D9 capable using the default drivers. Setting QT_OPENGL to desktop or angle skips the test and forces usage of the given GL. There are also two new application attributes that could be used for the same purpose. If Angle is requested but the libraries are not present, desktop is tried. If desktop is requested, or if angle is requested but nothing works, the EGL/WGL functions will still be callable but will return 0. This conveniently means that eglInitialize() and such will report a failure. Debug messages can be enabled by setting QT_OPENGLPROXY_DEBUG. This will tell which implementation is chosen. The textures example application is ported to OpenGL 2, the GL 1 code path is removed. [ChangeLog][QtGui] Qt builds on Windows can now be configured for dynamic loading of the OpenGL implementation. This can be requested by passing -opengl dynamic to configure. In this mode no modules will link to opengl32.dll or Angle's libegl/libglesv2. Instead, QtGui will dynamically choose between desktop and Angle during the first GL/EGL/WGL call. This allows deploying applications with a single set of Qt libraries with the ability of transparently falling back to Angle in case the opengl32.dll is not suitable, due to missing graphics drivers for example. Task-number: QTBUG-36483 Change-Id: I716fdebbf60b355b7d9ef57d1e069eef366b4ab9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* Fix MSVC-warnings about double to float truncation.Friedemann Kleint2014-01-241-24/+24
| | | | | Change-Id: I4aef12bd8fe37dffb06fc7d0b6a330bfc42fa270 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* expand tabs and related whitespace fixes in *.{cpp,h,qdoc}Oswald Buddenhagen2014-01-135-25/+25
| | | | | | | | the diff -w for this commit is empty. Started-by: Thiago Macieira <thiago.macieira@intel.com> Change-Id: I77bb84e71c63ce75e0709e5b94bee18e3ce6ab9e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Make OpenGL examples work on retina displays.Morten Johan Sørvig2013-11-294-5/+5
| | | | | | | | | glViewport expects device pixels, but the various geometry accessors returns values in device-independent pixels. Change-Id: I8004692de82251e4f1f25bf8f2698895f222ede3 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Remove warnings about examples not running in the Qt SimulatorTor Arne Vestbø2013-10-0911-28/+0
| | | | | | | The Qt Simulator is no longer supported with Qt 5. Change-Id: I0f98351d482dd0554ea0754746d56f94ee6bf22f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-09-162-5/+0
|\ | | | | | | | | | | | | Conflicts: src/corelib/tools/qstring.cpp Change-Id: Ifc6cd3a0f1cf14cc0fe6cf30afb0c7f40cfdbc3e
| * examples: remove unused static const variablesMarc Mutz2013-09-142-5/+0
| | | | | | | | | | | | | | They cause warnings on Clang. Change-Id: If599303f4a00c2a24f0a7c369299f3ea6fe7fc91 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* | hellowindow: Request multisampling only when told soLaszlo Agocs2013-09-101-1/+2
|/ | | | | | | | | | Similarly to qmlscene, multisampling will only be requested when passing --multisample on the command line. This is useful because (1) multisampling is not really needed by this app and (2) it helps with broken drivers that advertise MSAA configs but break when using them. Change-Id: I50ff0db80843f488899901ab796eee588b62078b Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* QGLWidget: Support retina framebuffer grabbingGabriel de Dietrich2013-05-231-1/+1
| | | | | | | | | And update the opengl/grabber example. Task-number: QTBUG-31173 Change-Id: If09f1f3634b353d034f51240fc68be6ee7aabb48 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Update opengl/overpainting example for high-dpiGabriel de Dietrich2013-05-231-2/+4
| | | | | | | | Depends on I8e81a0c6af61df1c4497a5934e2b89bad6f616f0 to properly render the overlay. Change-Id: I7ef6b726cc06eb750e7c00beb4ec6e80e85866a1 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Avoid harmless warning in paintedwindow exampleGunnar Sletta2013-05-142-7/+2
| | | | | | Task-number: QTBUG-31078 Change-Id: Id7221db752c06fc94e55ae859615abb2642a139b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Improved robustness of threaded rendering in hellowindow example.Samuel Rødal2013-04-252-26/+55
| | | | | | | | | | | | Previously resizes along with the animation was implemented using queued signals and slots, potentially causing a huge lag between the size of the window and the rendered contents. Now the animation is always driven by the rendering thread and is triggered based on the window's isExposed() status. Change-Id: Ifd89a63c2a436671a7b15326ff56be9ec2a5362d Reviewed-by: Jørgen Lind <jorgen.lind@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* PaintedWindow example: Use standard window flags.Friedemann Kleint2013-03-181-1/+1
| | | | | Change-Id: Ie7202efc88c176e2c39574677227c9f177c8e6d1 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Whitespace cleanup: remove trailing whitespaceAxel Waggershauser2013-03-169-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Merge branch 'release' into stableSergio Ahumada2013-01-311-0/+2
|\ | | | | | | Change-Id: If3aa1b7ed75082eff6e9761ad82c83691135ed60
| * push feature conditionals down to subdirectoriesOswald Buddenhagen2013-01-311-0/+2
| | | | | | | | | | | | | | | | | | the top-level project is not installed, and the meta-project which is used instead does not know anything about conditionals. Task-number: QTBUG-28414 Change-Id: Id5785ab5f92373ece74699e3c28220fc7f9689ac Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* | Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2013-01-221-1/+1
|\| | | | | | | Change-Id: Iaa321deb9e536ce89b87a337b57634f00c770a32
| * fix a typo in cube exampleJing Bai2013-01-181-1/+1
| | | | | | | | | | Change-Id: I1ad01aa519007d203669ccc63ef7d769b7e740b5 Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* | Update copyright year in Digia's license headersSergio Ahumada2013-01-1876-76/+76
| | | | | | | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Fix crash in hellowindow example when minimizing.Friedemann Kleint2013-01-151-1/+2
|/ | | | | | | Task-number: QTBUG-28439 Change-Id: Idcea2712afdbb08b4da2fa230fd8ba6aebd380b7 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Polish code of some opengl exampleshjk2012-12-2829-255/+182
| | | | | Change-Id: If24ae1845176fc525cf6a239a5079f4802f8df3f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* add and use qtHaveModule() functionOswald Buddenhagen2012-12-211-1/+1
| | | | | | | | | | | this is much more elegant than the so far propagated !isEmpty(QT.foo.name). also replace feature-specific tests (no-gui and no-widgets) and the obsolete contains(QT_CONFIG, foo) syntax. Change-Id: Ia4b3c8febcabf9eeca67b1f9173a523820b1038b Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com> Reviewed-by: Tasuku Suzuki <stasuku@gmail.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Fix compilation of Open GL ES 2 examples when using a Qt-namespace.Friedemann Kleint2012-12-193-5/+2
| | | | | Change-Id: I174569a8c989ab53fb6b9bb700c110db2f93c2d5 Reviewed-by: hjk <qthjk@ovi.com>
* remove QT+=widgets from SUBDIRS projectsOswald Buddenhagen2012-12-171-2/+0
| | | | | | | it makes no sense whatsoever Change-Id: Ica7c764575079a12512ee2eb62a995ebbefa09a0 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* OpenGL examples: Add error message about ANGLE on WindowsThomas Hartmann2012-12-177-0/+42
| | | | | | | | | | | | | | | | | | | These OpenGL examples require a Desktop OpenGL and will not build with OpenGL ES 2.0. This means those examples do not build on Windows with the default configuration using ANGLE. ANGLE is wrapping OpenGL ES 2.0 to DirectX and does not support the full Desktop OpenGL feature set. Since this is confusing for Windows users that do not know about ANGLE this patch adds an explicit error message describing the solution. (configuring Qt with -opengl desktop) Task-number: QTBUG-28590 Change-Id: I782e6830b9e282ddcc8a2ee0a47faf3579d36aab Reviewed-by: hjk <qthjk@ovi.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Removed requestOrientation() API from QWindow.Samuel Rødal2012-12-061-9/+7
| | | | | | | | | | | There are no proper implementations of this API, and as it stands it only acts to confuse anyone who stumbles across it. It will be better to revisit the full cross platform orientation API story for 5.1. Change-Id: Iff7054a32c6e5e4ad0cc0493a5e4ecc35a6ec4f3 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>