summaryrefslogtreecommitdiffstats
path: root/src/render
Commit message (Collapse)AuthorAgeFilesLines
* Unify license header usageAntti Kokko2016-01-26491-5463/+6936
| | | | | | | Update old header.LGPL3 to header.LGPL Change-Id: I8eac0cd6bbc276a56df487249cc459c0d4fab165 Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
* Refactor picking to use one thread per entityMike Krus2016-01-2515-678/+936
| | | | | | | | | | | | | | Added triangle visitor by refactor the triangle volume extractor Added ability to do a ray intersection with a single volume without using a thread Added entity collector Use one thread for each entity Ignore entities that don’t have a pick object Removed list of triangle volumes stored on each entity Use triangle visitor to test each triangle by creating a single volume on the stack Added triangle and 3 vertex index to the pick event Change-Id: Id3fd53549bf3ea07805426ef868df174f30e176b Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Expose picking details to front endMike Krus2016-01-2513-78/+164
| | | | | | | | Intersection (world and local) and distance added to pick event Modified test so that it includes the event Change-Id: I8631d626e5108d2e044374ee3425625f5588c38c Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QAspectEngine/QAbstractAspects: get rid of setDataPaul Lemire2016-01-2210-262/+172
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Renderer/Scene3D: fixes to make it work without setDataPaul Lemire2016-01-224-15/+37
| | | | | Change-Id: Iec1d3bab2e3a5a25d1cbb5129addebd83b225580 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Updated picking-qml examplePaul Lemire2016-01-2113-13/+90
| | | | | | | handle device pixel ratio and none full-window Scene3D Change-Id: Iadc504a00816d9363847bf9ec1e09d4b7c631666 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Port FrameGraphManager away from QResourceManagerTobias Koenig2016-01-208-71/+128
| | | | | Change-Id: I7399008adb0f612c78738f58f168fa38cf6ae845 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Cone geometry addedRobert Brock2016-01-196-0/+1050
| | | | | | | | | | | | | | | | | A cone that takes: - topRadius - bottomRadius - hasTopEndcap - hasBottomEndcap as well as the usual Cylinder arguments of: - length - rings - slices Task-number: QTBUG-41548 Change-Id: Id6b7352491be16146722c480a82b926ecb9c9c24 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Protect against a null surface in the renderview processing logicSean Harmer2016-01-191-0/+8
| | | | | Change-Id: I31eab49aff2af5b9d2341709c506f9d5525994ac Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Add window convenience property to QRenderSurfaceSelectorSean Harmer2016-01-183-1/+30
| | | | | | | | | | Behind the scenes this just updates the QSurfaceProperty which is all we care about on the backend. This is for QML since QSurface is not a QObject subclass (even though all sub classes of QSurface are via MI, grrrrr). Change-Id: I248eb59a92ed3bc99361ff23a0cd20d3c191769b Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Add annotations to QNormalDiffuseMapAlphaMaterial defaultSean Harmer2016-01-171-1/+10
| | | | | Change-Id: Idac0899f153254c26ed5a07761179c01504fd49f Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Make renderer us QSurface from RenderViewSean Harmer2016-01-171-16/+32
| | | | | Change-Id: I58180aea694de7a0c17e8ca9ba9f83755e3db419 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Increase frame allocator max object size a littleSean Harmer2016-01-171-1/+1
| | | | | | | | Adding the surface pointer to the RenderView pushed us over the old limit. Change-Id: Ibc28ffc2d56e6f768294dad971c00822e6aaffb6 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add surface selector to forward renderer framegraphSean Harmer2016-01-173-1/+25
| | | | | Change-Id: I9c436d3f5b9181075bfc0121174d530406f45c69 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Store the surface to use in the RenderViewSean Harmer2016-01-173-0/+16
| | | | | Change-Id: I4dbdfe9315dc3b0bb89119372301d24a292520d9 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Register renderer settings and set on rendererSean Harmer2016-01-176-0/+83
| | | | | Change-Id: I7f4a0c7a51721e8425f9e32aa1a0609fc3e5ee14 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Add backend for renderer settingsSean Harmer2016-01-173-2/+162
| | | | | Change-Id: I7e87cb106681c384a1b431a362fa904afafb877a Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Add QRendererSettings frontend classSean Harmer2016-01-174-2/+279
| | | | | | | | | Now sure if we should fold QFrameGraph into this too so as to have one place to configure the renderer. Of course we can easily aggregate both a QRendererSettings and FrameGraph components into an entity. Change-Id: Id17c185de908eedbcc53afe726a14f0c6f91ffca Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Register render surface selector types with aspectSean Harmer2016-01-171-0/+3
| | | | | Change-Id: Ia628cf7cff8698ae1bd390ed248b99780e1fbd37 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Add "We mean it" warningSean Harmer2016-01-171-0/+11
| | | | | Change-Id: Id52b55412be4e5e27476e05d1d66d226fcf5601e Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Add RenderSurfaceSelectorNode to frame graph backendSean Harmer2016-01-174-3/+165
| | | | | Change-Id: Ibd50fe11628d766588097a684be9e46254a5371b Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Add QRenderSurfaceSelectorSean Harmer2016-01-174-2/+248
| | | | | Change-Id: I65fbfed5bcf244668021878c0cfddb75d530e56e Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Fix deprecation warningsSean Harmer2016-01-179-9/+9
| | | | | Change-Id: I1ec0536ba81c738fc330f7f4c615a4e216645ea0 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Fix annotations in QSkyboxEntity defaultSean Harmer2016-01-172-0/+12
| | | | | Change-Id: I31ac1aba277a472577e1ba03c766dc4f1bf01f30 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Fix annotations in QDiffuseMapMaterial defaultSean Harmer2016-01-172-1/+14
| | | | | Change-Id: I6400350e8cbb52095859508a900225ee2fd7108f Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Fix annotations in QDiffuseSpecularMapMaterial defaultSean Harmer2016-01-172-2/+14
| | | | | Change-Id: I42a2ef40d274dab27971a17611dd5dd058e67653 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Fix annotations for QGoochMaterial defaultSean Harmer2016-01-172-1/+12
| | | | | Change-Id: I5cb3fb08fd9208e7e452e04cb4976033d091202d Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Fix annotations in QNormalDiffuseMapMaterial defaultSean Harmer2016-01-172-2/+14
| | | | | Change-Id: I3da1cb2912efb6be8dc8dbacf3bae915199860ea Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Fix annotations in QNormalDiffuseSpecularMapMaterialSean Harmer2016-01-172-1/+14
| | | | | Change-Id: Id9cd5cacec76f342f5090eecba5f33cad6fd8007 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Fix annotations for QPerVertexColorMaterial defaultSean Harmer2016-01-172-1/+14
| | | | | Change-Id: I91e8cb7277bd5957f60a8176c4a01f1f2188c93c Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Fix annotations in QPhongAlphaMaterial defaultSean Harmer2016-01-172-1/+14
| | | | | Change-Id: Ie96e1276dad51536d42d7d01c59885a82431a033 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Remove outdated TODO commentSean Harmer2016-01-171-1/+0
| | | | | Change-Id: I3f04ad88b194a02bd7ffbc60edd407a5ea29615a Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Add annotation to QPhongMaterialSean Harmer2016-01-172-1/+15
| | | | | | | | Allows technique selector in QForwardRenderer to select from the available techniques rather than excluding them all. Change-Id: Ia044f3ccdf15e012b52d519fad5f0415592046fe Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Move QCamera/QCameraLens to Qt3DRenderPaul Lemire2016-01-1613-309/+1442
| | | | | | | | Also get rid of Qt3DRender::QWindow and of the hard codes camera controller. Change-Id: I307735d01caf97b7a690b28de8dc99fc9866c35f Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Make ObjLoader available to unit tests/benchmarksTobias Koenig2016-01-161-1/+1
| | | | | Change-Id: If9376bb6f93f4fec7a0a57401a5a3b24563b97f1 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Support for DDS texturesMauro Persano2016-01-1613-124/+1013
| | | | | | | | | | | This commit adds support for DDS textures. It also adds QTextureLoader, a generic texture provider without a texture target. The actual texture target will be based on the properties of the texture loaded from its "source" property. Change-Id: If89cce7a55b3d82355f2da35588a091b7188f36c Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Don't use deprecated API for plugin loadingSean Harmer2016-01-151-2/+2
| | | | | Change-Id: I6ea0e9cc8dc296f00a0547f71cda67a9d26443a5 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* QBlendState: Target particular Draw Buffers (glBlendFunci())Wieland Hagen2016-01-155-39/+127
| | | | | | | | | | | | | | | | | There are 3 ways blending can be configured, depending on GL version: pre-3.0: Globally 3.0-3.3: Individual GL_BLEND for each Draw Buffer, one glBlendFunc 4.0- : Individual GL_BLEND and glBlendFunci for each DrawBuffer QBlendStates now allow to specify whether the blend state should be enabled or not, and what Draw Buffer it is specifying. Defaults are global and enabled. Removed backend BlendStateSeparate, BlendState is going to handle both calls. Task-number: QTBUG-50005 Change-Id: I0059a53db0d629ef9818d933c3f14e5662c1d3df Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Add GraphicsContext::supportsDrawBuffersBlend()Wieland Hagen2016-01-144-2/+9
| | | | | | | | | To check for availability of ARB_draw_buffers_blend Task-number: QTBUG-50005 Change-Id: I8f4e11ff401a9e1e3751f61421572cb1fc323979 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Added glEnablei, glDisablei, glBlendFuncSeparateiWieland Hagen2016-01-1413-1/+144
| | | | | | | | | | Added glEnablei, glDisablei, glBlendFuncSeparate to GraphicsHelpers and GraphicsContext Task-number: QTBUG-50005 Change-Id: I01c3a6e26fde9756d62694235ba0c1a0fe5155ae Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Fixed RenderView Uniform setting for QNode valuesWieland Hagen2016-01-141-2/+2
| | | | | Change-Id: I3aac90e19019345892e08a2994ee04667a7058dc Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Renderer: handle compute and draw render commandsPaul Lemire2016-01-134-138/+161
| | | | | Change-Id: I629dff26ce02fad1deaea8557d09a52e6d672ad7 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Technique: cleanup properly clears thingsPaul Lemire2016-01-131-0/+3
| | | | | Change-Id: Idbe854bdea0dca784fd1ac40cb34560bd7c22862 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* RenderViewJobUtils: fix technique filter wasn't setPaul Lemire2016-01-131-1/+1
| | | | | Change-Id: Iaf54b8c2e201b728b7f1313ba98d9a8e93a107e8 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* GraphicsHelper: add dispatch compute functionPaul Lemire2016-01-1313-3/+53
| | | | | Change-Id: I3c2614f0fc484d6f492d9302a3ec9335e827f741 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* RenderCommand: add a type flag (Draw/Compute)Paul Lemire2016-01-132-0/+8
| | | | | Change-Id: I5c194c73bd2e4db8895557bf5f69682420841b19 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* RenderView/GraphicsContext: support SSBO/UBO with buffer used as ParametersPaul Lemire2016-01-1322-115/+231
| | | | | Change-Id: I347aa5deea6521b43b9033e2200ab2f8b272f671 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Rename QUniformPack to ShaderParameterPackPaul Lemire2016-01-1310-21/+21
| | | | | | | | This will make it more clear that it also contains other things like UBO/SSBO which are pure Uniform values. Change-Id: I641246798b8c868d7bfdfde381221d9a97ed2d35 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* GraphicsContext: use GLBuffer instead of QOpenGLBufferPaul Lemire2016-01-136-133/+162
| | | | | | | | This will be needed to simplify the process of binding SSBO/UBO buffers. Change-Id: Ice3bb97381328c5bddf1c9e46af30b4814ff2572 Note: ShaderData UBO handling temporarly disabled. Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Add handle type for GLBufferPaul Lemire2016-01-131-0/+2
| | | | | Change-Id: I000b8c22a566639a622563a56edef87c1256c9c8 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>