summaryrefslogtreecommitdiffstats
path: root/examples/qt3d/examples-common/qt3dwindow.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Move last remaining pieces of examples-common to Qt3DExtrasPaul Lemire2016-05-011-175/+0
| | | | | | | Also created a Quick3DExtras for QML related extras (Qt3DQuickWindow) Change-Id: I1b95ea841e07ac8d68a07a1911d783b722e6fe03 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Move defaults and geometries out of Qt3DRender and into Qt3DExtrasPaul Lemire2016-04-231-3/+3
| | | | | | | QBoundingVolumeDebug has been disabled for now. Will be re-enabled later on. Change-Id: Id6b0abab2ec2aa697330bd20d782f9d104d25d50 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Remove dead code.v5.7.0-beta1Volker Krause2016-04-121-39/+0
| | | | | | | | Also, this was poorly duplicating code from the other ctor and would have crashed due to an uninitialized m_forwardRenderer. Change-Id: I5f4a04868362d07fe726931add986e1e2a415271 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Make the camera part of the scene hierarchySean Harmer2016-04-101-0/+2
| | | | | Change-Id: Id5d796a988ce538f126d3c39461dd03d0ee94d60 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Make examples work on ES2 builds on systems supporting desktop GL as well.Volker Krause2016-04-041-0/+4
| | | | | | | | | In such a scenario we were creating desktop surfaces, which GraphicsContext is missing the code to handle in ES2 builds. It thus left parts of its internals uninitialized, and subsequently crashed. Change-Id: I359597d48287f0ac75acb8d875d55197da7fb8a2 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* OrbitController Qml and Cpp for Qt3D CameraRobert Brock2016-03-241-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | Adding an Orbit control that will allow a user to orbit / pan in a 3D QML scene. --- QML - LMB translate - RMB orbit - RMB + LMB dolly - Arrow keys translate - Shift + Up/Down keys dolly - Alt + Arrow keys orbit --- CPP - LMB translate - RMB orbit - RMB + LMB dolly - Arrow keys translate - Shift + Up/Down keys dolly - Alt + Arrow keys orbit Both examples have their speed inputs clamped to -1 and 1 Zoom in can now be limited Change-Id: If24c45c7350767a1682dccfd2e4d49d95433fd5d Task-number: QTBUG-50660 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* RenderSettings: add RenderPolicy propertyWieland Hagen2016-03-091-7/+7
| | | | | | | | Users may want to explicitly choose a rendering policy, e.g. RenderOnDemand or AlwaysRender. Change-Id: I465c5ac671134e7bf42fbd950e475f86edc3a321 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Drop QFrameGraph in favor of QRenderSettingsWieland Hagen2016-03-091-8/+8
| | | | | | | | | QFrameGraph did store just the Frame Graph Root, and was not configurable at runtime. This functionality has been moved to QRenderSettings. The renderer now gets the scene graph root directly from QRenderSettings. Change-Id: I3012eb96b8073717f96f5e42374859a3f4a89bfc Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QAspectEngine::setRootEntity takes a QSharedPointerPaul Lemire2016-02-221-1/+1
| | | | | Change-Id: Ia1cb3f216a4a828890ac53d5a025ca0dd970dc85 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Set window as input event source for c++ examplesSean Harmer2016-02-031-0/+8
| | | | | | Change-Id: Ib99b7680893f8113a950ce01a1d6e85d39d9835b Reviewed-by: Robert Brock <robert.brock@kdab.com> Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Unify license header usage.Antti Kokko2016-01-261-18/+32
| | | | | | | | Updated license headers to use new BSD header instead of LGPL3 one (in those files which will be under BSD) Change-Id: I300c5840db3fd4708d5d85e84f7c6729cba326e5 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* QAspectEngine/QAbstractAspects: get rid of setDataPaul Lemire2016-01-221-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | Getting rid of set data and the refactoring on setting the surface implies that: - Given the FrameGraph configuration, there may be several RenderViews each having a different RenderSurfaceSelector/Window - This means that the Renderer/QRenderAspect can't know about the surface before reading the scene - This means that the Renderer may be dealing with more than 1 window - This means that initialization, render and shutdown procedures will have to be updated accordingly Therefore the Renderer was refactored to: - Be initialized without knowing about a surface - For each RenderView, check the surface and if different from the previous one: * Make the context current with it * Create the appropriate glHelpers (as Surfaces may have != formats) TO DO: - Fix picking - Fix windows exposition - Fix shutdown / detection of all windows beging closed Change-Id: I49d070b05f46be4b26cfb57e494feba145d1da9c Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Always create a QFrameGraph component and forward rendererSean Harmer2016-01-181-15/+22
| | | | | | | | This will allow to easily set for e.g. clear color from a C++ app even before the window is shown. Change-Id: I343b68d2fd1a3a37f99f3437afb900597fe02390 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Add getter for frame graph to Qt3DWindowSean Harmer2016-01-181-0/+5
| | | | | Change-Id: I6ae1dc30f1bcf442724d39ca27f150fc5785fe3f Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Set surface on framegraph for C++ examples using Qt3DWindowSean Harmer2016-01-171-0/+1
| | | | | Change-Id: Ida750d593e925ba7021a5fb3c77177f436312255 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Move QCamera/QCameraLens to Qt3DRenderPaul Lemire2016-01-161-7/+9
| | | | | | | | Also get rid of Qt3DRender::QWindow and of the hard codes camera controller. Change-Id: I307735d01caf97b7a690b28de8dc99fc9866c35f Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Link examples against static libPaul Lemire2016-01-161-0/+179
Contains: Qt3DWindow Qt3DQuickWindow QFirstPersonCameraController FirstPersonCameraController.qml This will allow to get rid of the Camera configuration hack Change-Id: I55c5634aa4c162f9dd2852d3258073a6352b426c Reviewed-by: Sean Harmer <sean.harmer@kdab.com>