summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Update docs for QGeometry and QGeometryRendererAntti Määttä2017-01-102-118/+154
| | | | | | Change-Id: Idaffe9ae764f10c4f84dc95ede2229d021f990a2 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add unit tests for trianglevisitorAntti Määttä2017-01-103-1/+1098
| | | | | | Change-Id: I560c891a26c18c198e3b11eb02548b542e58591e Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Update EntityLoader docsAntti Määttä2017-01-101-1/+10
| | | | | | Change-Id: I5b87cc9a581267fab5a0c482f243f9e1d611423a Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Update QTransform docsAntti Määttä2017-01-101-107/+128
| | | | | | Change-Id: Iad61725581a49bca910e104b13f0ea1925d1a948 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Update QTechniqueFilter docsAntti Määttä2017-01-101-8/+43
| | | | | | Change-Id: I9d345e8cdc00e9178d2bda23d112f78b85c563ca Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QRendererSettings::setActiveFrameGraph(): Set surface for new graphWieland Hagen2017-01-092-8/+22
| | | | | | | | | If the old frame graph already has a QRenderSurfaceSelector, use the surface assigned to this selector for the new frame graph, too. Task-number: QTBUG-57401 Change-Id: I5a0142d4ca40f5ff0047b7b42ae79fdc48189cf0 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Ignore RenderCommand for current frame, if shader not loaded yetWieland Hagen2017-01-093-5/+11
| | | | | | | | | | Renderer::m_shaderGathererJob might not have finished yet, so the shader wasn't marked as dirty yet, so it wasn't loaded in Renderer::updateGLResources(). Next frame everything will be alright. Task-number: QTBUG-55093 Change-Id: Ia60ed1dff4cb0495efbd7f70f87d227007ef560d Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Merge "Merge branch '5.8.0' into 5.8" into refs/staging/5.8Sean Harmer2017-01-092-1/+10
|\
| * Merge branch '5.8.0' into 5.8Sean Harmer2017-01-062-1/+10
| |\ | | | | | | | | | Change-Id: Iefed681bbf91a685cc14ed30e65a64c9cb06ed0e
| | * Fix race condition with dynamic texture updatesv5.8.0Sean Harmer2017-01-062-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mutex protect the dirty flag written by both the threadpool and the submisison thread. Without this it is easy to end up with no textures being used when the user updates them under certain workloads. Task-number: QTBUG-57939 Change-Id: Idba4137f023ccfcb6ceb409cc6df3a2b4dddf510 Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
* | | Reinstate back face pickingMike Krus2017-01-095-17/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If enabled and front face picking fails, try points reverse order. Handling pick results appropriately in unit tests. Don’t use the triangle bounding volume and ray casting service to avoid large amount of unnecessary object creation and data copying. Task-number: QTBUG-57876 Change-Id: I4c4f570cb8de1fa33fcde117f1543e8625633817 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | | Don’t perform picking if QObjectPicker is disabledMike Krus2017-01-096-5/+202
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Look at value of enabled property before performing picking. Also disabled entities will no longer be evaluated for picking. Finally, bail out early if none of the object pickers is enabled. Task-number: QTBUG-50553 Change-Id: I57768416be735f3a3641edafc66c4a2f866465ff Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | | OpenGLVertexArrayObject: add a destroy methodPaul Lemire2017-01-092-0/+13
| | | | | | | | | | | | | | | Change-Id: I0fd40ace5234697a0d281cac7e0bdc1680d73558 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | | Clicked event only generated if pickers matchMike Krus2017-01-091-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Only generate the click event if the press and release object pickers are the same. Task-number: QTBUG-57040 Change-Id: I95cfd57ddec52ca5339ed56604bcc4bf376e988d Reviewed-by: Antti Määttä <antti.maatta@qt.io>
* | | Unit tests for render capture backend nodeAntti Määttä2017-01-097-3/+147
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add unit tests for the render capture backend node and make small changes to backend node to make them work. Change-Id: I053d85755f5f53ac4de08c63ca88537696d1d7b2 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | | Allow Qt3DWindow::setRootEntity() after window has been shownWieland Hagen2017-01-071-5/+7
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-56403 Change-Id: Iea63ac7560c3f0cd20ee79ed92d47a77f9f6dcc2 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | | Fix build with ICC during -Werror: unused local variableThiago Macieira2017-01-071-1/+2
|/ / | | | | | | | | | | | | | | | | | | | | This variable is in an anonymous namespace, so ICC rightly finds out that nothing uses it. Declare our intentions properly in the comment and add the Q_DECL_UNUSED to tell the compiler to shut up. error #2415: variable "Qt3DRender::Render::<unnamed>::qNodeIdTypeId" of static storage duration was declared but never referenced Change-Id: I73fa1e59a4844c43a109fffd148cccdc579c3851 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Initialize QRenderAspectPrivate's m_offscreenHelper member variableGuillermo A. Amaral2017-01-061-0/+1
| | | | | | | | | | | | Task-number: QTBUG-57813 Change-Id: Idda5034b35abc35ba52e04d050ee644d6edb22ac Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Merge branch '5.8.0' into 5.8Sean Harmer2017-01-054-5/+11
|\| | | | | | | Change-Id: I2d387ace8d5661d992b93841ec642b062f51e612
| * Don't abort when getting an unknown/undefined uniform valueSean Harmer2017-01-031-1/+1
| | | | | | | | | | | | | | | | | | | | Instead print out a runtime warning so that the developer can identify and fix it. The implementation will use a default constructed UniformValue. Task-number: QTBUG-57710 Change-Id: I2a344284c3bcd9b7310324f420e6544c73101dff Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
| * BufferManager: prevent race on buffersToRelease vectorPaul Lemire2017-01-033-4/+10
| | | | | | | | | | | | | | | | | | | | Dirty buffers to release are added in the QAspectThread::syncChanges but we may be rendering/cleaning up resources at the same time in the render thread. Now protecting any call that could modify the buffers with a mutex. Task-number: QTBUG-57655 Change-Id: If98702b901bab0e092c039d4da2f0c3f3cdca7cc Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
* | Re-run VAO initialization next frame, if something goes wrongWieland Hagen2017-01-052-6/+17
| | | | | | | | | | | | | | | | | | | | | | Shaders might not have been compiled when the VAOs are initialized, so the vertex attributes can't be set correctly. If this happens or anything else that's not correct, make sure to re-run the whole VAO initialization process next frame. Task-number: QTBUG-56603 Change-Id: Ice8daa1732fa80dcb84dc02528360cefab74b819 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | CalculateBoundingVolumeJob: Ignore disabled entitiesWieland Hagen2017-01-052-0/+4
| | | | | | | | | | | | | | | | | | | | Disabled entities may not have their buffer uploaded, so the buffer would remain 'dirty', thus triggering a bounding volume update each frame, potentially causing excessive CPU load. Task-number: QTBUG-55954 Change-Id: I72fa4648465dfa8026225ee5e8a487c941f1e551 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Correct filtering of disabled entitiesWieland Hagen2017-01-0512-6/+203
| | | | | | | | | | | | | | | | | | | | | | | | | | FilterLayerEntityJob would not check for the enabled-ness of parent entities, if present. We introduce another job that checks for each entity, whether it is enabled or not. Jobs that need to access this flag must take care to add a dependency on the UpdateTreeEnabledJob Task-number: QTBUG-56235 Change-Id: Ic087fc8e9efdd4829cdb18ae3e8430344f6ecf43 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | QNode: Defer QScene registration until after object construcionWieland Hagen2017-01-054-8/+138
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We used to call m_scene->addObservable() from the ctor of QNode. This would lead to the QScene calling QNode::setArbiter(), which in turn calls QNodePrivate::registerNotifiedProperties(). This method relies on the meta-class of 'this' in order to connect the property change listener to all property change signals. So, since the QNode instance is not yet initialized properly, no connections are made at all and no property update notifications will work. This patch fixes this issue by deferring the call to after object construction. Change-Id: I45ef46c416f88a84ca55c9b9833312d0fd433d0e Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Make sure QPickTriangleEvent gets generatedMike Krus2017-01-043-5/+22
| | | | | | | | | | | | | | | | | | Pass down flag to even creation method. Add unit tests for type of event received. Task-number: QTBUG-57071 Change-Id: Iaee32002e2f5a46ca526af5375f8a50361a6ca3e Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Bump versionOswald Buddenhagen2017-01-031-1/+1
| | | | | | | | Change-Id: I438ed5d8bb7e0cfc2bdd769b60e8136eaae3eec8
* | BugFix - Added warning when upVector is null or (anti-)collinearRobert Brock2017-01-021-0/+2
| | | | | | | | | | | | | | | | | | | | Odd behavior was noticed when the camera was set to be collinear with the up vector. A warning has been added in the updateViewMatrix() to check for when this happens. Task-number: QTBUG-57726 Change-Id: I396f74cd9d6566beaf13e07f2d878228bf102aea Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Properly update texture data generator from frontendWieland Hagen2016-12-211-2/+3
| | | | | | | | | | Change-Id: I404966da06be4331af91785fdf7726142e5ff055 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Add RGB8_UNorm to render capture formatsAntti Määttä2016-12-201-0/+1
| | | | | | | | | | | | Task-number: QTBUG-57719 Change-Id: I30ae2f8ba5240d1b6958cd3f2a136c53410250eb Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Merge "Merge branch '5.8.0' into 5.8" into refs/staging/5.8Sean Harmer2016-12-1665-109/+1915
|\ \
| * | Merge branch '5.8.0' into 5.8Sean Harmer2016-12-1665-109/+1915
| |\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/render/backend/render-backend.pri src/render/backend/renderer_p.h src/render/frontend/qrenderaspect.cpp Change-Id: If0481f031a6caf7995fefa93b96f1fdeb96cbd26
| | * Make sure destroyed OpenGL context is no longer usedv5.8.0-rc1Miikka Heikkinen2016-12-164-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Listen to QOpenGLContext::aboutToBeDestroyed() signal in classes that do cleanup related to OpenGL context to disallow its use after its destruction. Task-number: QTBUG-57578 Change-Id: I580e737da7b0c9167dc3cfd65514f2b3f689bb62 Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Fredrik Orderud <forderud@gmail.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| | * Only pass static metaobjects around and fix EntityLoaderPaul Lemire2016-12-1612-5/+427
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Ensure the notification changes only pass in static metaobjects. - Make the EntityLoader use the AsynchronousIfNested incubation mode to avoid cases where we could destroy something still being incubated - Add a manual test to test this cases This fixes the crashes occurring when using NodeInstantiators and EntityLoaders as delegates. Change-Id: I104c60b4be34cfb843a74dd09a8b96fdac44657d Task-number: QTBUG-57655 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| | * Add changes file for 5.8.0Antti Kokko2016-12-141-0/+51
| | | | | | | | | | | | | | | Change-Id: I27724f6108936aadb93ceee4bd526f0bfedc0950 Reviewed-by: Antti Määttä <antti.maatta@qt.io>
| | * Ensure offscreen surface used during cleanup is created on gui threadSean Harmer2016-12-1410-8/+245
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Windows uses a QWindow to back QOffscreenSurface so we must needs create it on the gui thread. To complicate matters we don't know the format used by Qt 3D until the Renderer is initialized. So we have to defer creation of the offscreen surface until that time and do it in the gui thread with the correct format. Task-number: QTBUG-57496 Change-Id: Idaad23c2229ab069f3e02c8d075be8e6718a8a50 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
| | * Add a new job type entryPaul Lemire2016-12-141-1/+2
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-57509 Change-Id: I40f2bf58e8faff1639c79a152974c60a1c0d99bb Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| | * Properly order texture jobsPaul Lemire2016-12-145-1/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1) Load all the texture data 2) Sync 3) Look for dirty textures We want to wait for textures to have been loaded to look for the dirty textures otherwise the texture may not be ready and we would render some invalid texture. Task-number: QTBUG-56466 Task-number: QTBUG-57509 Change-Id: I2326f81bfe51dcdc753ff4eba150ce4cfae1635f Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| | * Textures: properly abandon and release texture dataPaul Lemire2016-12-148-13/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a texture is destroyed it now properly destroys the GLTexture if the GLTexture was not being shared. Also, when a GLTexture is created but the texture image data for its content already existed, make sure we still request the data to be uploaded. This happens since functors can be shared, in which case the image data isn't reloaded and therefore doesn't call texture->requestUpload() implicitly. Task-number: QTBUG-57595 Change-Id: Id8f437ff64eea39be75ebb1a548516b29932e23e Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| | * Fix hover support in QObjectPickerMike Krus2016-12-142-29/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove early termination test (looking to avoid doing picking on mouse move) as it breaks hover support. Need to more thorough test later Change-Id: Ia65803f921a63765d56d44620bdae2155ef0666e Task-number: QTBUG-57592 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| | * Also fix other problems with the trianglevisitorAntti Määttä2016-12-101-11/+12
| | | | | | | | | | | | | | | | | | | | | | | | Indexed triangle strips have wrong index passed to visit. Triangle fans do not set the first index and traverse incorrectly. Change-Id: I75971d485edaf1660dd1531d733702283f673e9b Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| | * Fix indices passed to TriangleVisitorAntti Määttä2016-12-101-17/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | TriangleVisitor traverse functions incorrectly pass indices offset by vertex stride to visit function. Task-number: QTBUG-56989 Change-Id: I7617953377d3cef72f887cfc732140f1b3db192f Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| | * Work around QML -> C++ float to int conversionSean Harmer2016-12-103-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QML converts values of reals that have zero fractional parts e.g. 2.0 to integers when passing them to C++. This can result in Qt 3D and the Uniform class passing these to uniform floats in GLSL by reinterpret_casting the integer to a float which results in a garbage value in the shader which in turn leads to very difficult to debug shader issues. This commit handles this particular case (in a hacky way) for the Qt 5.8.0 release. We need to find a more fully featured solution for converting Uniform's to the correct introspected GLSL types. This will require being in position of the introspected shader interface when building the RenderViews. This is too large of a change to do in time for the 5.8.0 release. Hence this work around solution for now. Task-number: QTBUG-57510 Change-Id: I6631879fff8259a32960e461bad4c692ca630220 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
| | * Fix texture data upload timingSean Harmer2016-12-104-11/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Following the texture refactoring, textures are correctly uploaded at application startup. However if the content of texture data is later changed, e.g. by changing source property of a TextureImage, this is never made available to the GPU. Tracing this through, the texture image data generator is correctly executed but it seems the OpenGL submission thread tries to upload the data before the new data is made available to the TextureDataManager. The subsequent clearing of the dirty flag means it never gets uploaded. To fix this the TextureData dirty flag in GLTexture has been re-purposed to mean that the generators have been executed and the data is ready and available for upload. This flag was actually redundant for the purpose of scheduling the generators to be executed as that is handled directly by the texture data manager and GLTexture. With this commit, the upload is never attempted until after the texture image data is ready and we see textures behaving correctly once again. Task-number: QTBUG-57509 Change-Id: I662c8d17e17283a2a3be5afbf61289ec2405d4fc Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
| | * Fix warnings about unregistered metatypesSean Harmer2016-12-082-0/+5
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-57495 Change-Id: Ia1dc858d3c6c223498cec3644dcd8d35b7181630 Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
| | * Ensure GL resources are released at renderer shutdownSean Harmer2016-12-081-5/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | Also taking care to handle Scene3D case where releaseGraphisResources() may get called more than once. Task-number: QTBUG-57496 Change-Id: I987a372ddfeb026c95a6b50a885c57687d294a00 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
| | * RenderCapture: register with version 2.1Paul Lemire2016-12-073-4/+4
| | | | | | | | | | | | | | | | | | | | | To clearly identify this was added in 5.8 and not part of 5.7 Change-Id: Ifd713efa34f0092c250eae58260fab71865bb49e Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| | * Handle Android assetsBogDan Vatra2016-12-071-1/+5
| | | | | | | | | | | | | | | | | | | | | Allow the user to load textures from Android's assets Change-Id: Ia6cb67419345c0120f9a8af3c22bdce22b02c930 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| | * Add plumbing and process AxisAccumulators each frameSean Harmer2016-12-0720-5/+529
| | | | | | | | | | | | | | | Change-Id: I91a0f9384c7ef2ba642db1a2becdba1d2e374d87 Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
| | * Export AxisAccumulator to QMLSean Harmer2016-12-071-0/+2
| | | | | | | | | | | | | | | Change-Id: I5d351b89d78846a9654674ec52a783c947c5f4c4 Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>