summaryrefslogtreecommitdiffstats
path: root/src/render/io
Commit message (Collapse)AuthorAgeFilesLines
* Doc: Fix multiple C++ documentation issuesTopi Reinio2015-04-143-1/+15
| | | | | | | | | | | | | | | | | | | - Remove multiple \namespace commands for namespace Qt3D. QDoc in 5.5 is now able to collate namespace members from multiple modules. - Mark 'Q...Private' classes and functions taking private arguments as \internal - Use correct \qtvariable for Qt 3D Core and Render - Add src/plugins directory to Qt 3D Core documentation build to correctly generate Assimp-related documentation. - Ensure documentation for C++ properties is visible by using the \property command instead of documenting the setter/getter functions. - Add export and logging macros to qdoc ignore directives - Remove unnecessary use of \fn command - Language and styling fixes Change-Id: I2481fa30ad2f6869b85c038c20ff1730b8522d46 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* [.*SceneParser] Minor clean-upKonstantin Ritt2015-03-164-27/+25
| | | | | Change-Id: I171a3e44383f2f5160b24113de6d92725ed19fe9 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Nano optimization to GLTFParserKonstantin Ritt2015-03-041-3/+3
| | | | | | | | Do not load a identity matrix if we're going to initialize its values by hand. Change-Id: I7d745f4090a78ab4ecca99c313f15d689d32fc92 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Avoid warning with MSVCLaszlo Agocs2015-02-131-1/+1
| | | | | | | Fix an int - size_t mismatch and a linkage problem. Change-Id: I19a57861850b4e112c98beb42b00d0a05d3f5509 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Make scene parsers operate on URLs instead of raw filenamesLaszlo Agocs2015-02-133-6/+10
| | | | | | | | This way they are compatible with how mesh and texture source URLs are handled. Change-Id: Ifeee504fd3f5957d23f5cade92a73663488bdaf9 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Fix image format for texturesLaszlo Agocs2015-02-111-3/+3
| | | | | | | | | | | | | | We always convert to RGBA8888 so the only acceptable combination is GL_RGBA - GL_RGBA8. Previously we were checking the presence of the alpha channel in the original image. This is quite wrong since we end up with GL_RGBA - GL_RGB8 type of combinations in case the input has no alpha. That is not a valid combination. This makes images without an alpha channel, e.g. image formats that provide Format_RGB32 QImages, working. Change-Id: I2631071134c5224c52b64cff2f00ef6ae166762b Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Copyright header change.Mika Salmela2015-02-0919-363/+268
| | | | | | | | As for preparation for Qt5.5 release the copyright header is updated to correspond the current license requirements. Change-Id: I36632918b66f455539453b42c369689fb11298ec Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Texture API refactoringPaul Lemire2015-02-082-24/+20
| | | | | | | | | | * Added LoadTextureDataJob * QAbstractTextureProvider: maximum layers property * Automatic QAbstractTextureProvider::TextureFormat added * material-qml should work perfectly with that patch. Change-Id: I3f92f13b783155798772086304a30126a4fc687d Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Make ctor of QAbstractTextureProvider protectedPaul Lemire2015-02-081-23/+25
| | | | | | | That enforces to use one of the subclasses. Change-Id: Idba7300ed322954ba6866c4a262ad4ee74c024e5 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QTexture renamed to QAbstractTextureProviderPaul Lemire2015-02-082-6/+6
| | | | | | | | | | This is done prior to the whole texture API refactoring. Doc was also added, might need improvement later on but a base is present at least. Change-Id: I75589f14dfbfba7bc4250b2e0960670e020ed38a Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* TextureData add setter for CubeMapFacePaul Lemire2015-02-081-0/+5
| | | | | Change-Id: I91694d6b9b241d3dfe24e114455332085c99c656 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QMeshData: move default attribute names getter to cppPaul Lemire2015-01-262-5/+30
| | | | | | | Caused issues on VS2010 Change-Id: Iac757662be6f2c733da472acd3b13134c3bf8ee4 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* RenderShaderData handling entirely reworkedPaul Lemire2015-01-182-0/+6
| | | | | | | | | | | | | | | | | | | | - UBO created for each Shader/ShaderData - We deal with nested QShaderData by looking for QNodeId only instead of looking for QShaderData* - We update only the values that have changed into the UBO - A CleanupFrameJob was added to properly clear all RenderShaderData set for updates after a frame - RenderShaderData is cleared of all UBO rendering logic - BlockToUBO contains all the updated properties for a given UBO in a RenderView, that solves the issue of properties being updated in the RenderShaderData while performing a draw call Note: the QShaderData transformed properties were commented for now deferred-examples and playground qml updates to follow Change-Id: I8ecf155288c154f41b505cf465d31f5eb8a71b5d Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* [QMeshData] Rename PrimitiveTypes to PrimitiveTypeKonstantin Ritt2015-01-053-6/+6
| | | | | Change-Id: I9f67e0906fc481491a604090a0ade1c8b9c2793c Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Fix simple typoKonstantin Ritt2015-01-051-1/+1
| | | | | Change-Id: Ieecf6a5f57323d8b19335652a7432af9af7759bf Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Define GL_UNIFORM_BUFFER for dynamic GL buildsSean Harmer2014-12-121-0/+4
| | | | | Change-Id: Ib43a253aef549d95f7e0c22a92b8b3a89e30b6a0 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* UniformBuffer: update takes an offsetPaul Lemire2014-12-122-5/+3
| | | | | | | | This will allow to properly use glBufferSubData to only update parts of the buffer that have changed. Change-Id: Ic4d30e4608de85c71f9650dd785a3c1b796e0ba4 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* UniformBuffer: wraps around the GL calls needed to have a UBOPaul Lemire2014-12-123-2/+181
| | | | | | | | Will be used by the RenderShaderData internally to map the CPU side buffer to the GPU side Uniform Buffer Object. Change-Id: I6b8ffdbff49d806bb8668df81ec59872feafe611 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Optimize: Remove temporary allocations in QMeshData::attributeNames.Milian Wolff2014-12-093-11/+22
| | | | | | | | | | This is called frequently and was previously triggering many temporary data allocations. By using a separated QStringList and QVector, we can keep the behavior of the QHash and can remove the temporaries. Change-Id: Idd7db916341037e98b78730d4f599990041ec706 Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* renderlogging.h -> renderlogging_p.hSean Harmer2014-11-195-5/+5
| | | | | Change-Id: I985366c47d2a1f721761c64b1870850071ace885 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Rename AxisAlignedBoundingBox->QAxisAlignedBoundingBoxSean Harmer2014-11-184-9/+9
| | | | | | | | | | We may be able to make this a private class so as to not use up the name for a type we may need to export to QML in order to allow the user to specify a custom bounding box for use with culling if the shader they are using does some non-standard scaling (e.g. instancing). Change-Id: Id7120eba6407060507ac3d4c45061ce9670557c7 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* QTransform refactoredPaul Lemire2014-10-301-1/+1
| | | | | | Change-Id: I9c05c37b7f9576b81169c30686de96c9267e4854 Task-number: QTBUG-41542 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QTechnique refactoredPaul Lemire2014-10-301-21/+21
| | | | | | Change-Id: I0389c19a52aa690b5eaa8c2a3e7dee6a2b17e565 Task-number: QTBUG-41533 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QTexture refactoringPaul Lemire2014-10-301-6/+3
| | | | | | | | | | | | | | Target is now set in the ctor from C++. On the QML side, there's a QTexture subclass for each target. WrapMode on s, t, r for texture, accessible as a grouped property in QML. Note: I left out the static fromImage as I didn't really understand their purpose. Please let me know what I'm missing. Change-Id: I16f75283ae459cbd8ab2d1ec53584b3022bc965b Task-number: QTBUG-41537 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QMeshData: enum for primitivesPaul Lemire2014-10-224-10/+21
| | | | | | | | | | Each value in the enums maps directly to the correct GLint for a given primitive patch. This allows to still return an int to be used directly by the renderer. This should also fix compilation error of ES2. Change-Id: I7ec54dcb2cbb02b67fa6225bb80fb7e691687e2c Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QAbstractMeshData merged with QMeshData and moved to RendererPaul Lemire2014-10-227-42/+173
| | | | | | | That implied moving QAbstractMesh to Renderer as well. Change-Id: I9013bf0458b849f7805d214a70580a80e86d8c84 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QAbstractMesh: setDirty -> updatePaul Lemire2014-10-201-1/+1
| | | | | | Change-Id: I8e4094d69446ec8290fa34e4875f5e1cf822054c Task-number: QTBUG-41522 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QShaderProgram: remove source file properties, replace by helper methodPaul Lemire2014-10-181-2/+3
| | | | | | | | | | Only the source code QByteArray properties remain. The user is still able to load a shader from a source file by using the shaderFromSource helper method and assigning what it returns to one of the QByteArray source code properties. Change-Id: I5246498fa680ec74d095d7a45f0b1bce239efc13 Task-number: QTBUG-41536 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Have copy() only on QNodeKevin Ottens2014-10-161-6/+7
| | | | | | | | | | It was previously both on QNode and QNodePrivate. The one on QNodePrivate didn't give us much as it didn't eliminate the virtual of QNode. Change-Id: Ia1ea9dd831674109c84bd7005abe7fde3b1223fa Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Hide doClone implementations behind a macroKevin Ottens2014-10-151-8/+1
| | | | | | | | | This way we will avoid inconsistencies. It also means making some of the copy() implementations more clever. Change-Id: Ic79c9ec7c9c32f8951d5d9f5184592880bf8d5fd Reviewed-by: James Turner <james.turner@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Silence warnings in GLTF parserSean Harmer2014-10-041-0/+2
| | | | | Change-Id: Ifaf0e94a01bbd8a8aff545dda086dd9ae00ed8a7 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* QNode refactoringPaul Lemire2014-10-031-19/+34
| | | | | | | | | | | | | | | | Move almost everything to private classes. Assimp loading restored. All examples working. QNode hierachy is now handled through QObject::setParent, addChild, removeChild are part of the private api. Note: commented QChangeArbiter unit tests as they can no longer work with this patch and will restore them when QChangeArbiter will have been made private. Task-number: QTBUG-41470 Task-number: QTBUG-41523 Change-Id: I4430974b3aa7f3744c38714b451b122e0cb4d0c9 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* GLTFParser commented out parts to adapt to QParameter changesPaul Lemire2014-09-301-70/+70
| | | | | Change-Id: Ia44a602d6111c7622f921cf8e41bc4c33e670728 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Improved/Refactored cloning and doClone off all subclassesPaul Lemire2014-09-301-3/+7
| | | | | | | | Note: As we are using QScene during cloning, it is important that node hierarchy be created and added in the proper order (parent then child). Change-Id: I8fd53f7ca696ec9aca19cc70dc116ccba4154911 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* LoadSceneJobPaul Lemire2014-09-301-1/+1
| | | | | Change-Id: Id463d1e26d2cbafd63454a71324d7dba3a6b7138 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Comparison operator for QAbstractMeshFunctor subclassesPaul Lemire2014-09-301-0/+6
| | | | | Change-Id: I18f0c46631615787a5505f7591514bfd33ac6bd0 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QParameter new overloaded ctorsPaul Lemire2014-09-291-1/+1
| | | | | Change-Id: Ia6e3c3285884265b303485176109a4d2c80ccabe Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add an example to exercise tessellation shader supportSean Harmer2014-09-211-3/+4
| | | | | | | | | | | | | | Also extended Renderer and friends to support setting the number of vertices per patch with glPathParameteri(GL_PATCH_VERTICES, n). To support this QMeshData now also stores the vertices per patch. This demonstrates how to tessellate using quad tessellation mode. Follow-up commits will add objects to show triangle and isoline modes. Change-Id: I68afb31815db430d0b4d8d9cc525efcfb9a216fc Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Add support for remaining shader stages and rename some propertiesSean Harmer2014-09-211-2/+2
| | | | | | | | | | | Examples updated to reflect new QShaderProgram property names. Next commit will add a new example to test the handling of tessellation and geometry shader stages. We need to somehow expose buffers and image units to make use of compute shaders. Change-Id: Idf76cef97a42d5829402c8aa8cc4e288678a3407 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Assimp external dependencyPaul Lemire2014-08-197-1335/+7
| | | | | | | | The AssimpParser is now a SceneParser plugin that is build if config tests for assimp succeed. Change-Id: I0e3f6a6ce2a43298b71b0261084f6c79521f214d Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Texture renamed to QTexturePaul Lemire2014-08-194-15/+15
| | | | | Change-Id: I6f5570ce042b8d3ef44aa76c1fd8ce3a1dde4d3c Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Texture subclass of QNodePaul Lemire2014-08-191-1/+1
| | | | | Change-Id: I0b6f3a6e4dfa75ce1cc29ee38bb709b8bad6a88f Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Mark ObjLoader as privateSean Harmer2014-08-183-2/+2
| | | | | Change-Id: I04f0be3d791651ac27906b7eb29c0c3a1bae831b Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Rename MeshData -> QMeshDataSean Harmer2014-08-1810-66/+63
| | | | | Change-Id: I23a466ebd29666bed1c56f29c6f049544a4eca23 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* The gltf parser is now privateSean Harmer2014-08-183-2/+2
| | | | | Change-Id: If6ff04047cb3befe532a0b83f09c8c6ca1c08a35 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Mark assimp parser and helpers as privateSean Harmer2014-08-185-5/+5
| | | | | Change-Id: If22a66125735b0c378a38c3d85069dfb4e98a581 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Make AbstractSceneParser privateSean Harmer2014-08-185-4/+4
| | | | | Change-Id: I79618c1f1c928dd19b6fd99b77bc5243941d3683 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Mark backend render classes as private and fix compilationSean Harmer2014-08-173-44/+46
| | | | | Change-Id: I1afb8408e03d4b5405e8ee82d1a3b6b4364d3f5d Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Fix in assimpparserPaul Lemire2014-08-151-1/+1
| | | | | Change-Id: I97a63a97f2352c7e82a627fe36ce253db3c5243a Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Avoid naming classes DrawStateLouai Al-Khanji2014-08-152-5/+7
| | | | | | | | | | | Since winuser.h contains a DrawState #define, this tends to wreck havoc on Windows. This patch respectively renames QDrawState, Qt3D::Render::DrawState and Qt3D::Render::DrawStateSet to QRenderState, Qt3D::Render::RenderState and Qt3D::Render::RenderStateSet. While this is more invasive than just undefining DrawState, it should be more foolproof too. Change-Id: I9fa86e5bf1fe41fb4839bd146822cc43e26019e6 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>