summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Don't assume position attribute uses default name in visitPrimitivesAndy Nichols2018-03-081-1/+3
| | | | | | | | | | | | | | | | | It is not ok to assume that the position attribute has the default position attribute. It should be the fallback behavior like it is in calculateLocalBoundingVolume. In this case we should try and query the boundingPositionAttribute if it is set. If anything this could have been called just "positionAttribute" since we need to introspect mesh data in a few places and need to know the positionAttribute. The previous logic meant that meshes used by Qt 3D Studio could not take advantage of advanced picking (anything other than bounding spheres) because it does not use the built-in materials or default attribute names (they are optional after all). Change-Id: I5b02a0532add1582ae48121cdc6a7b3040ad1cdd Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Documentation for ray castingMike Krus2018-03-077-32/+389
| | | | | | | | Also updated object picker and pick settings and made raycaster components non-sharable. Change-Id: Ief3e5dcb3eefdd94c05e7a4e914b43d56b43e24a Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Add more job tests for raycastingMike Krus2018-03-079-48/+511
| | | | | | | | | | - test screen space ray casting - fixed handling of filters - fixed handling of ray length - few tests for filter handling Change-Id: Ifc24d8f9e73556669338b3936a41dfa2c674e306 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Either fully qualify property types, or not at allVolker Krause2018-03-063-4/+4
| | | | | | | | | The semi-qualified types confuse the meta type system, QAbstractAnimation in particular, as that also exists as a top-level type. Change-Id: If20387fe76d46f88f6a89523d5d3f4aac8b1fef0 Reviewed-by: Svenn-Arne Dragly <svenn-arne.dragly@qt.io> Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
* ObjGeometryLoader::doLoad(): Fix fall through warningsFriedemann Kleint2018-03-021-0/+2
| | | | | | | | | | | Fix: objgeometryloader.cpp:161:49: warning: this statement may fall through [-Wimplicit-fallthrough=] objgeometryloader.cpp:163:51: warning: this statement may fall through [-Wimplicit-fallthrough=] Amends 4338a85487788bb553cef0eaa5e5a3f929934eea. Change-Id: I4a77a6436eef0d91ccc69decdfe4365dfdc5df22 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Add unit test to check memory alignmentPaul Lemire2018-03-015-0/+267
| | | | | Change-Id: I59b817f9972d0a6866f7cc57a4bcd6fe2cd097c9 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add test to check if readding shader removes dna from m_pendingRemovalAnders Hafreager2018-02-281-0/+27
| | | | | | | Task-number: QTBUG-66498 Change-Id: Icb18a996c9384b3e41f296694d91b13677f054c4 Reviewed-by: Svenn-Arne Dragly <svenn-arne.dragly@qt.io> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Prevent readded shaders to be purged from cacheAnders Hafreager2018-02-281-0/+2
| | | | | | | | | | | | | In ShaderCache::removeRef, the shader DNA is added to m_pendingRemoval. Previously, if the shader was readded before ShaderCache::purge was called, ShaderCache::purge would still remove it even if it was in use. This change removes a readded shader DNA from m_pendingRemoval. Task-number: QTBUG-66498 Change-Id: If18b28273cccfd2a8cba2c7bc6379d983ce6ecb9 Reviewed-by: Svenn-Arne Dragly <svenn-arne.dragly@qt.io> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Doc: Fix documentation warnings for Qt 3D RenderTopi Reinio2018-02-2818-68/+57
| | | | | | | | | | | | | This change fixes multiple QDoc warnings for Qt 3D Render that are related to how Clang parses the source code and the \fn QDoc commands. A number of changes are related to preventing documentation for private classes from generating warnings. We still have a number of 'No documentation for ...' warnings left - those are not addressed in this change. Change-Id: Ic92a729496a81e7869060811ed7dd23408cff833 Reviewed-by: Martin Smith <martin.smith@qt.io>
* QResourcesManager: remove simd code from headerPaul Lemire2018-02-283-18/+57
| | | | | | | | Rather move the simd code to a .cpp file that gets compiled once with the proper flags Change-Id: Ifc28eed844ef94224f45d0e307046a1cb884bf14 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Fix SIMD related warningsPaul Lemire2018-02-281-2/+4
| | | | | Change-Id: Ia7d08551de0b10e3e859da5301ea8e2be501c722 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* simd: declare AVX2 friends only if __AVX2__ definedPaul Lemire2018-02-283-13/+20
| | | | | Change-Id: I8fd88461874367bcaa9f4b27a9b4fc660cd2a030 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* RenderThread: fix races with texture and bufferPaul Lemire2018-02-283-2/+15
| | | | | | | | Add dependencies to ensure we won't allow the RenderThread to proceed if we haven't completed the execution of the texture and buffer gatherer jobs. Change-Id: Iaad67be893738b948bf26ca903f3bff7f16a1b88 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Fix race between RenderThread and ShaderGathererJobPaul Lemire2018-02-283-3/+6
| | | | | | | | | | By setting the proper dependency which ensures we are done looking for dirtyShaders by the time updateGLResources in the RenderThread is executed. Patch provided by svenn-arne.dragly@qt.io Change-Id: I4515cbfc3a391f887a42178220e6f0814a707745 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Fix RenderView uniform minificationPaul Lemire2018-02-283-7/+89
| | | | | | | | | In the case where we had two or more groups of RenderCommands where each group shares a common shader, uniform minification wouldn't be applied to the second command of each groups after the first one. Change-Id: Ie73f559e3f44f0f22ddd79017fd413262cae6ab4 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Load textures in a single framePaul Lemire2018-02-2811-112/+372
| | | | | | | | | | | | | | | | | Because of texture sharing, Qt3D compares functor before executing them. Instead of blindly loading a TextureImage functor which could turn out to not be used, Qt3D required 2 frames to fully update a texture. This behavior has been removed, now when a texture image functor is updated, it updates the texture in one frame. It is assumed that the user is responsible for declaring only TextureImage that he is actually going to use. Any scene that uses OnDemand rendering and frequently changes a texture image functor can be used to test this. (ex-painted-cube is a good example for KDAB) or paintedtexture-cpp in manual tests Change-Id: I8c2f13876244a862633e10e472e2b49cbd6e126b Task-number: QTBUG-63561 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Revert "Keep rendering in sync with aspect jobs by adding barriers"Paul Lemire2018-02-2828-911/+437
| | | | | | | | | | | | | | | | | | | | | | | This reverts commit 46319648436814afb5a77755dde6681e304befaf. We want to be able to render one set of RenderViews for frame n while concurrently building RenderViews for frame n + 1. The reverted commit removed that behavior which reduced the CPU time available to prepare a frame. This would cause on some scenes a failure to meet the ~10ms budget we have to prepare a frame. This is therefore a regression. The root cause behind this regression is that a job cannot be executed until all the jobs which have been previously launched have completed. The proposed solution would be to instead add an OpenGL command thread that can be used to load graphics resources required for the RenderViews directly when required. This would in turn allow to cache RenderViews and keep the concurrent behavior of RenderView submission and creation. With that goal in mind, the following patches will be rebased and updated https://codereview.qt-project.org/#/c/189309/ https://codereview.qt-project.org/#/c/189310/ Change-Id: I4879047c45986a0e615e3aef7b7352f82a04a9da Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Set mip levels correctly when having only texture imagesLaszlo Agocs2018-02-271-0/+9
| | | | | | | | | | Otherwise it is impossible to provide custom texture data for multiple mip levels. (as QTextureImageData is the only public API; there is no texture data generator in this case, only individual texture images) Task-number: QTBUG-66686 Change-Id: Iaab37ee6510ffd4db07ce7865d9b6f0ff80d2947 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Add unit test for QScreenRayCasterv5.11.0-beta1Mike Krus2018-02-243-0/+142
| | | | | Change-Id: I76933b23f27bc0fefcbc55342715b2ebd7f7716d Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add unit test for layers on raycasterMike Krus2018-02-231-0/+84
| | | | | Change-Id: I5f8401e7a61924fbfe88fddf5b44fd77fa92099d Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add debug support for SphereMike Krus2018-02-232-0/+17
| | | | | Change-Id: I8262ada29898df37c33855b9cb33aead419b02a6 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Update QRay3D stream IOMike Krus2018-02-231-2/+7
| | | | | | | for debugging and streaming Change-Id: Id9924fa9a99c6412069e6907473d0dfe083e3107 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add a warning to texture loading mirrored propertyAdam Treat2018-02-222-4/+24
| | | | | | | | | | | | The default behavior for texture loading of uncompressed or CPU compressed images results in a performance price at runtime. Add a warning to the documentation describing this behavior and how to avoid it. Ideally, in the future we'll have an asset conditioning pipeline that will handle this in an optimal manner for the user of the 3D framework. Change-Id: I795d011adfedcbcf8d80224a36adbf9465140066 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Fix color scaling in copyGLFramebufferDataToImageAnders Hafreager2018-02-221-3/+3
| | | | | | | | | | | | | | | | | Previous implementation used a component conversion for QAbstractTexture::RGBA32F (when GL_TYPE is GL_FLOAT) which results in a non-linear mapping from [0,1] to [0,127]. A non-linear mapping should only be used for some GL_TYPE other than GL_FLOAT. See https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/ glReadPixels.xhtml for more. This change maps color linearly to the range [0,255] when QAbstractTexture::TextureFormat is QAbstractTexture::RGBA32F. Task-number: QTBUG-66514 Change-Id: I4aa36b59acd193c7342ba4b0577f132e0c19ef85 Reviewed-by: Svenn-Arne Dragly <svenn-arne.dragly@qt.io> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Merge remote-tracking branch 'origin/5.9' into 5.11Liang Qi2018-02-219-10/+140
|\ | | | | | | | | | | | | | | Conflicts: src/render/backend/renderer.cpp tests/auto/auto.pro Change-Id: Idc5bb088ae7f591809f8795124a3e44410bf4cf9
| * Fix OnDemand rendering by keeping ComputeDirty from being re-enabledSvenn-Arne Dragly2018-02-142-5/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous implementation would reset ComputeDirty every frame if markDirty(AllDirty) had been called earlier. This would break the OnDemand rendering policy because every frame would be rendered even if there were no changes or no compute commands in the scene. This change removes the code that would re-enable the ComputeDirty flag every frame and documents that the user must either set the rendering policy to Always or trigger the rendering of a new frame if the rendering policy is set to OnDemand. Change-Id: Ide03a3a49ee1670fd9d67ed47454c6679219765d Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * Remove null pointer checkJesus Fernandez2018-02-121-2/+2
| | | | | | | | | | | | | | | | >>> CID 187918: Null pointer dereferences (REVERSE_INULL) >>> Null-checking "node" suggests that it may be null, but it has already been dereferenced on all paths leading to the check. Change-Id: Ic799724e91d118a2c5b2715c5742a4184b09a217 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * ObjGeometryLoader: Fix out of bound errorPaul Lemire2018-02-087-8/+124
| | | | | | | | | | | | | | Apparently this was a major security issue reported to security.qt-project.org Change-Id: Id52f035134ca6111e24b5820eb1b64b99449e47f Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | QParameter: add bookkeeping of QNode valuesPaul Lemire2018-02-213-4/+48
| | | | | | | | | | Change-Id: I0a7334907e4b34df6955fb24832958b674d7b62b Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Revert "CameraControllers: use the Camera's upVector"Sean Harmer2018-02-192-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 627167bd4a2e1dc12ffee813e82f9b33bff19a22. There was a reason to use the y axis as the up vector here which is to keep the camera controller oriented correctly. Without this restriction it's far too easy to end up with a twisted camera. If we want a fully free trackball type controller, let's add that as a new type, or perhaps as an option on these. Change-Id: I56c8708535d4ccd05ccb5f2ddea732bb27abda58 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* | Doc: Fix documentation warnings for Qt 3D CoreTopi Reinio2018-02-1616-53/+47
| | | | | | | | | | | | | | | | | | | | | | | | This change fixes multiple QDoc warnings for Qt 3D Core that are related to how Clang parses the source code and the \fn QDoc commands. We still have a number of 'No documentation for ...' warnings left - those are not addressed in this change. Change-Id: Ia6394f453d7bd959bc4d4cc9347ac0039b80f661 Reviewed-by: Martin Smith <martin.smith@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.10' into 5.11" into ↵Sean Harmer2018-02-15135-1471/+3023
|\ \ | | | | | | | | | refs/staging/5.11
| * \ Merge remote-tracking branch 'origin/5.10' into 5.11Sean Harmer2018-02-15135-1471/+3023
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/animation/doc/src/qt3danimation-module.qdoc src/render/backend/abstractrenderer_p.h src/render/backend/buffervisitor_p.h src/render/backend/renderer.cpp src/render/backend/renderer_p.h src/render/backend/triangleboundingvolume_p.h src/render/backend/trianglesextractor_p.h src/render/frontend/sphere_p.h src/render/jobs/calcboundingvolumejob.cpp src/render/jobs/job_common_p.h src/render/jobs/pickboundingvolumejob.cpp src/render/jobs/pickboundingvolumejob_p.h src/render/jobs/pickboundingvolumeutils.cpp src/render/jobs/renderviewjobutils_p.h tests/auto/render/boundingsphere/tst_boundingsphere.cpp tests/auto/render/commons/testrenderer.h tests/auto/render/raycasting/tst_raycasting.cpp tests/auto/render/render.pro tests/auto/render/renderer/tst_renderer.cpp Change-Id: I76633bc5a5a065e5f9ea62cc16563377e5c693a3
| | * | Move calculateBoundingVolumeJob dependency on updateTreeEnabledJob5.10Svenn-Arne Dragly2018-02-091-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move it to renderBinJobs because we clear all dependencies of calculateBoundingVolumeJob at the start of this function. Change-Id: Idebe10349181d95813e47e85b2e6f4f2ae39e615 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
| | * | Proceed to the next frame even if we cannot lock the surfaceSvenn-Arne Dragly2018-02-091-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, if the render surface could not be locked or makeCurrent failed, the aspect thread would be stuck waiting for the next frame and the render thread would be stuck waiting for the render jobs. This change makes sure both threads continue, which will allow changes to the surface to be synchronized and make the render thread try to lock the surface again. Task-number: QTBUG-66243 Change-Id: I01bbe4c2ca74961f363efbe87c0586edaad41c62 Reviewed-by: Harald Vistnes <harald.vistnes@gmail.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
| | * | QAbstractCameraController: Make struct InputState publicFriedemann Kleint2018-02-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For generating Python bindings, the struct InputState needs to be public since a Python binding needs to be created for it so that a wrapper of QAbstractCameraController can be generated that calls into Python for an implementation of moveCamera(). Task-number: PYSIDE-487 Change-Id: Ib410b19a9e886ad06335dac05fd56206a72220bf Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
| | * | Doc: add doc to undocumented methods and properties qt3dNico Vertriest2018-02-064-3/+29
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ia498dd96a6d35997a3f493f26b376fb8fa146196 Reviewed-by: Svenn-Arne Dragly <svenn-arne.dragly@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| | * | Merge remote-tracking branch 'origin/5.9' into 5.10Sean Harmer2018-02-063-39/+50
| | |\| | | | | | | | | | | | | Change-Id: I72fdfb9a20be2f819542243e888756818b03c28e
| | | * Fix crash if sharecontext is requested before initailizationMäättä Antti2018-02-062-34/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Scene2D can sometimes receive the render initialization event before the qt3d renderer has been initialized. This causes crash because the sharecontext hasn't been set yet. Add safeguard against this. Task-number: QT3DS-904 Change-Id: Ib50a60ed89c12ac54c9165266466d9804affe77c Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| | | * Fix crash in scene2d at shutdownMäättä Antti2018-02-061-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The resource manager policy for scene2d nodes has been changed so the scene2d constructor gets called multiple times at startup. That in turn increments render thread user counter every time. The cleanup code gets called for each instanciated QScene2D node so at shutdown the counter never reaches zero and the render thread is not closed properly. Change the implementation so that the counter gets incremented only when the render thread has been properly initialized. Task-number: QTBUG-66003 Change-Id: I33a5b1f407e65329776bcabe0b66ff049581a435 Reviewed-by: Svenn-Arne Dragly <svenn-arne.dragly@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| | * | Merge remote-tracking branch 'origin/5.9' into 5.10Sean Harmer2018-02-0542-252/+1260
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/render/backend/trianglesvisitor.cpp src/render/backend/uniform.cpp src/render/jobs/calcboundingvolumejob.cpp src/render/jobs/pickboundingvolumejob.cpp src/render/jobs/pickboundingvolumeutils.cpp Change-Id: Ib8305011c51710a3538c0b29f7022388f5244a38
| | | * Bump versionOswald Buddenhagen2018-02-021-1/+1
| | | | | | | | | | | | | | | | Change-Id: I3e4cd0ca1086953206a5dc32d2721a673b6a8e4a
| | | * Fix array of textures in shader parameterMauro Persano2018-02-028-52/+94
| | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-61759 Change-Id: I2c61f9cf41124816d10da90783c7fb9ff6088fc4 Reviewed-by: Mike Krus <mike.krus@kdab.com>
| | | * Ensure node creation changes are sent before using in list propertiesSean Harmer2018-02-024-2/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This completes the fix for out of order event delivery related to creation changes. We now ensure that QNodes used as values in singular and list properties are fully constructed on the backend before they are referenced in properties of other nodes. Also added a check to not recurse into sending too many changes when adding a child node. Written with Svenn-Arne Dragly. Task-number: Task-number: QTBUG-65956 Change-Id: I1470e0f685c81d1277ac04ad985ec1b76f1c27c0 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
| | | * Add test for picking object from multiple directionsMike Krus2018-02-023-0/+198
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This would have caught the breakage caused by changing how the camera view matrix was computed Change-Id: I521b7e6c700aeaa1c751cdf0aceb8b8ab66a6af9 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
| | | * Don't compute bounding volumes for patch-based geometryMauro Persano2018-02-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The actual geometry for patch-based geometry renderers is computed in tessellation shaders, so don't try to compute bounding volumes. Task-number: QTBUG-66073 Change-Id: I9ff13c526859020ff85ba84e6db7c4c4b7335974 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
| | | * Cleanup AssimpImporterPaul Lemire2018-02-012-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | And improve error output Change-Id: I9364e0e610cc758ad322bf96b52f57989c7ed0df Reviewed-by: Mike Krus <mike.krus@kdab.com>
| | | * Compile failing shaders once only and avoid asserting on failureLaszlo Agocs2018-02-014-10/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This way a material with a broken shader will fail once (and won't be retried unless the shader code gets changed), and the application will continue gracefully, without asserting. Task-number: QTBUG-65936 Change-Id: I7003e8c6f7d9094280d7757c1020b485f93e3b37 Reviewed-by: Svenn-Arne Dragly <svenn-arne.dragly@qt.io> Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
| | | * Make PickBoundingVolumeJob depend on ExpandBoundingVolumeJobSvenn-Arne Dragly2018-01-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PickBoundingVolumeJob uses QEntity::worldBoundingVolumeWithChildren(), which is set by ExpandBoundingVolumeJob. Change-Id: Ic03360a694254e45c9abfd6863a7b101910bb7fc Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
| | | * Handle 0 stride vertex dataMike Krus2018-01-294-16/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All examples, even with packed data, set actual vertex size on the attribute. However, convention is to pass 0 for packed data, in which case GL will compute vertex size based on number of coordinates and component data size. Neither the buffer visitor nor the triangle visitor respected this convention and relied on the real size to be set. Now computing the actual stride if it's passed in as 0. Change-Id: I9a65fd7d8d56f181e31faa93389e3fdd1a973c17 Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>