summaryrefslogtreecommitdiffstats
path: root/src/Runtime
Commit message (Collapse)AuthorAgeFilesLines
* Copy distance field shader changes to OpenGL runtimeJere Tuliniemi2019-05-2010-117/+114
| | | | | | | | | | | Also fixes the OpenGL runtime to use alpha channel for the glyph texture when using ES2. Task-number: QT3DS-3343 Change-Id: Ia37c341802e504da21ebeaff6f3f1f5b50bd1bfe Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Antti Määttä <antti.maatta@qt.io>
* Update presentation id into assetmapKaj Grönholm2019-05-171-10/+24
| | | | | | | | | | | Updating id into assetmap is required for GetPresentationById() and GetPresentationList() to work after presention id is modified during runtime. Also rename variable as id isn't only initial now. Task-number: QT3DS-3383 Change-Id: I9022ccde25ae65f972a0ace0399d85d975c4f45e Reviewed-by: Antti Määttä <antti.maatta@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Add possibility of creating groups to createElementMiikka Heikkinen2019-05-171-79/+95
| | | | | | | Task-number: QT3DS-3381 Change-Id: I4fc5c009d6cf4720867282f12a870074b17c0f66 Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Add methods to create/delete multiple elements/materials at onceMiikka Heikkinen2019-05-1715-663/+848
| | | | | | | | | | Also modified the notification signals to notify multiple creations with a single signal. Task-number: QT3DS-3376 Change-Id: I75bc867601d3f7943733b451ddfad18fab9383ea Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Increment UIP versionMahmoud Badri2019-05-1612-66/+6
| | | | | | | | | | | | - increment UIP version and show a warning if a UIP version is lower - remove 3 obsolete text shadow props - small update to checking for material container in the timeline - few cleanups Task-number: QT3DS-3366 Task-number: QT3DS-2903 Change-Id: Ib4d8c33e786001d0e5a18037a52303449630adf5 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Make API related classes easier to findPasi Keränen2019-05-1646-2/+6383
| | | | | | | | | | | Make files defining the API and API implementation more visible by moving them to separate folder, just like in Qt 3D Runtime. Rename to be more in line with Qt 3D Runtime similar classes (and also make filename match class name). Task-number: QT3DS-3478 Change-Id: Ie7b91ab7c1dce09c3a07b9f385af8e7ed24c536a Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Fix compiler error in Qt3DRuntimeView.cppAntti Määttä2019-05-162-96/+0
| | | | | | | | | Doesn't compile with latest 5.12 because the Q_OS_WINDOWS is not defined. Remove the include since it is not used. Change-Id: I9506bca4e9ae3ec140d4da878e8fafbf473a31d9 Reviewed-by: Kaj Grönholm <kaj.gronholm@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Implement Q3DSSurfaceViewer::presentationReady in OpenGL RuntimeJanne Kangas2019-05-156-2/+24
| | | | | | | | | | | | | New signal fixes the issue where setAttribute calls triggered at presentationLoaded() were lost as the runtime overrode attribute values with initial values in UIP file. presentationReady signal is triggered when the initial property values are set, and setAttribute can be safely called to update properties. Task-id: QT3DS-3398 Change-Id: Id605ddeb92766da11e0280a276ffc5e36c57b931 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Assume project fonts are in a subdirectory relative to project or presentationJari Karppinen2019-05-144-9/+12
| | | | | | | Task-number: QT3DS-3353 Change-Id: Iee9719c00b0da9d6e28b0baade9fd26b35f88d79 Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Add elementCreated signalMiikka Heikkinen2019-05-146-56/+121
| | | | | | | | | | Also unified elementCreated and materialCreated signals to include error string to indicate failure. Task-number: QT3DS-3418 Change-Id: I4b60b1e32594b2993a5a421ac1ce66d33b521a05 Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Add material creation to runtime C++ APIMiikka Heikkinen2019-05-1413-185/+814
| | | | | | | | | | | | | | Materials can only be created into the material container, animatable materials are not supported. Elements using new created materials should not be created before Q3DSPresentation::materialCreated signal is received. Task-number: QT3DS-3377 Change-Id: I782f09094d5f7151d7e1dab28b76fbbfdfcb6066 Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Jari Karppinen <jari.karppinen@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Autogenerate mipmaps for texturesAntti Määttä2019-05-145-3/+23
| | | | | | | | | | Generate mipmaps if they are missing using QT3DS_GENERATE_MIPMAPS. Also enable anisotropic filtering and allow setting the value with QT3DS_ANISOTROPIC_VALUE env variable. Change-Id: I53f7ed6ec0e3ee511b4d605ba8a76d1177ced966 Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Support variants tags on Text objectsMahmoud Badri2019-05-141-4/+7
| | | | | | Task-number: QT3DS-3415 Change-Id: I6897133273a0c43fade6f564f4ea8d2e0347138d Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Add missing vec4 for datainput parsingMahmoud Badri2019-05-133-0/+24
| | | | | | Task-number: QT3DS-3394 Change-Id: Ib99a65285b248e4efe623a8aba7d7b784b9fa611 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Fix crash in editor when changing presentationsAntti Määttä2019-05-131-0/+1
| | | | | | | | | | Reloadable textures must be cleared when buffer manager is cleared. Task-number: QT3DS-3403 Change-Id: Ia0bd6e08fbf50d527a9e8ab2d4a4336c891229b5 Reviewed-by: Kaj Grönholm <kaj.gronholm@qt.io> Reviewed-by: Jari Karppinen <jari.karppinen@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Fix visibility toggle using data inputAntti Määttä2019-05-101-1/+1
| | | | | | Task-number: QT3DS-3358 Change-Id: I615e179d7eadfca01be516d8abe0d6b4efb6a211 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Optimize behavior scriptsAntti Määttä2019-05-105-41/+407
| | | | | | | | | | | | | | - setAttribute accepts vector parameters. This reduces setter calls from the script - updateProperties caches the properties so that they are updated more quickly and also it doesn't set unused parameters anymore - Also fixes data input metatypes for vector types - Allow getAttribute to return static properties as well Task-number: QT3DS-3414 Change-Id: I4508d8b2f57facf855662bb89bfeea0487bd4a6f Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Only utilize active camerasKaj Grönholm2019-05-101-7/+12
| | | | | | | | | This avoids different cameras being used for rendering and picking. Task-number: QT3DS-3360 Change-Id: I14b9730388ffdc2e11df0f1b0d9a6e29e37edc3a Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Add a missing float4 parsing methodMahmoud Badri2019-05-091-0/+4
| | | | | | | Task-number: QT3DS-3400 Change-Id: I384a8d7fea24d7b8c489e2775dcab5544a238453 Reviewed-by: Jari Karppinen <jari.karppinen@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Remove circular build dependencywip/qtifyJanne Kangas2019-05-0910-22/+29
| | | | | | | | | Duplicate enum defined in studio3d module on runtime side to avoid including the entire class from studio3d. Task-id: QT3DS-3396 Change-Id: I193b34614a8bbf991f717f8302061298b56e451e Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Add missing float4 types to Runtime data model datatypesMahmoud Badri2019-05-086-20/+64
| | | | | | | Task-number: QT3DS-3400 Change-Id: I17de1c3a1d6ba4a6877a9570ab9821523e345565 Reviewed-by: Jari Karppinen <jari.karppinen@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Fix OpenGL runtime picking with scaled cameraKaj Grönholm2019-05-076-9/+34
| | | | | | | | | | | | When camera scale property has been modified, picking scale needs to be inverted or it scales into wrong direction. This affects both runtime viewer and editor in scene camera view. Task-number: QT3DS-3393 Change-Id: Ib643af22861b81fb0fc9e78ebfd2d724e765eff5 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Antti Määttä <antti.maatta@qt.io>
* Add deleteElement to C++ APIMiikka Heikkinen2019-05-079-7/+144
| | | | | | | | | Add possibility to delete elements that have been added with createElement. Task-number: QT3DS-3374 Change-Id: I701e565241d18294171cd63ef934083f627b89aa Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Add dynamic object creation to presentation C++ APIMiikka Heikkinen2019-05-0711-99/+463
| | | | | | | | | | | | A new model element can be dynamically created into the scene. The slide and properties of the element can be specified at creation time. A material element is automatically created for each added model. The material is specified with a custom "material" property in the list of creation properties. Task-number: QT3DS-3209 Change-Id: I52b0e929023092110820405473a9399b67a305cd Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Add simple performance viewAntti Määttä2019-05-0710-41/+76
| | | | | | | | | The F7 button in the viewer now shows the render statistics as well as the layer profiling timers. Task-number: QT3DS-3211 Change-Id: I9553b9c522a9d16efd53b17c1f10538294b2b834 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Fix camera lookAt in OpenGL RuntimeJari Karppinen2019-05-071-5/+2
| | | | | | | | | | Convert radians to degrees as in Qt3D Runtime. Task-number: QT3DS-3349 Change-Id: Icc4935a07ce3b9e246b13b179646714267d23956 Reviewed-by: Jere Tuliniemi <jere.tuliniemi@qt.io> Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Remove remaining state machine codePasi Keränen2019-05-063-21/+0
| | | | | | | | Remove state machine code and .uia file statemachine part. Task-number: QT3DS-2846 Change-Id: Id4b74c296f9be4067e78906937dcb9086e60b949 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Move CRenderString to foundation and rename to Qt3DSStringPasi Keränen2019-05-0621-132/+140
| | | | | | | | | | | | | CRenderString is no longer just the runtimerenderer or renderer. It is aimed to replace all the various string types and then pave the way for moving to QString from unified string class base. Better place for this class is in the foundation. Task-number: QT3DS-3370 Change-Id: I50c25aadddd39fba48451544509894c3e7ac89fc Reviewed-by: Jari Karppinen <jari.karppinen@qt.io> Reviewed-by: Antti Määttä <antti.maatta@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Implement fixes to the distance field rendererJere Tuliniemi2019-05-0617-75/+46
| | | | | | | | | | | | | | - Change modelView matrix to mvp for sharper texts - Support global opacity from parents - Allow changing alpha from the text color picker - Change shadow color to be the same as the text color Task-number: QT3DS-3343 Task-number: QT3DS-3363 Change-Id: I37178abe6c9239619a3f9de440d2b9245a138a82 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Convert CRenderString to be QString basedPasi Keränen2019-05-0313-124/+761
| | | | | | | | | Replaces QString as the implementation class of CRenderString instead of std::basic_string Task-number: QT3DS-3370 Change-Id: Ie1b9068bfdbf0ce05659f1ae83fe9243acdf7eee Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Implement dynamic loading of slide resourcesAntti Määttä2019-05-0332-271/+944
| | | | | | | | | | | | | | | Implements loading of textures and images during runtime instead of load time. - Images which are not part of any slide are loaded at load time - Master slide images are always loaded at load time - Images used in a slide are loaded when the slide is entered - Images are unloaded when slide is exited and any other slide does not use them Task-number: QT3DS-3208 Change-Id: I7a827a5e828908efd2b104fe25374c66958319d2 Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Allow subpresentations as textures for custom materials and effectsJere Tuliniemi2019-05-026-21/+105
| | | | | | | | | | | | | | | | | Effects already supported taking the subpresentation as a texture in the runtime. That behavior is now copied by the custom materials. This also fixes a runtime bug where the subpresentation was rendered only if a default material already had the subpresentation as a texture. Now custom material and effect properties are iterated prior rendering If they contain subpresentations, those are added the to the render task list. Task-number: QT3DS-3165 Change-Id: I7bddec2fece442065d517320d0e381eba5f1b159 Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Remove CTegraApplication to reduce intermediary classesAntti Määttä2019-05-028-399/+189
| | | | | | | | Use the INDDView in the ViewerApp directly. Change-Id: If502dd51d4ea87fc96d892cb9255df42b06fa4f3 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Pasi Keränen <pasi.keranen@qt.io>
* Support alpha channel initial workMahmoud Badri2019-05-0234-128/+246
| | | | | | | | | | | In this initial work, all (almost) color properties are converted into a new type (float4) to support an alpha channel. Alpha channel option is shown in the color dialog for Layer and Scene background properties only. The following is remaining: - Scene background alpha doesn't work in the editor (works in the viewer RT1) Task-number: QT3DS-3128 Change-Id: Ib5540ebc8e2ff68709473451e4a92bf66ddb8ad2 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Add customSignalEmittedAntti Määttä2019-04-306-0/+11
| | | | | | | Task-number: QT3DS-3215 Change-Id: If36cca0d864b8c2fa7fd6ec499ace678ecaa206a Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Do not update behavior script properties alwaysAntti Määttä2019-04-301-1/+1
| | | | | | | | Only update them when they have changed. Change-Id: I77e87640c62e1289fec980a7d1737803d49e762a Reviewed-by: Jere Tuliniemi <jere.tuliniemi@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Add SetAttribute with element variableAntti Määttä2019-04-303-1/+17
| | | | | | | This removes additional element fetch from the call. Change-Id: Iaf279769a040a0de350eab3bf3dcdf98751644d8 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Add clipping to distance field fontsJere Tuliniemi2019-04-292-38/+88
| | | | | | | | | | Removes fallback to the old text renderer and adds the clipping feature to the distance field font renderer. Task-number: QT3DS-3329 Change-Id: Ie41b93c9a9ed791297349007c7e2b3bf10c982b1 Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Remove unused codePasi Keränen2019-04-2977-25765/+119
| | | | | | | | | Remove stateapplication (Architect integration) code. Remove perflog code. Task-number: QT3DS-3331 Change-Id: I208cce7551b3d332fb7905ae7cd4151c883b3728 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Add qDebug stream overrides for render base typesPasi Keränen2019-04-263-17/+1070
| | | | | | | Task-number: QT3DS-3342 Change-Id: I649202fc96eb658f2da7647f7b722de8a25cced7 Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Convert RGBA64 images to RGBA8 when loadingAntti Määttä2019-04-261-0/+11
| | | | | | | Task-number: QT3DS-3354 Change-Id: I68396ec7ccf9a99820edd7b7501ee39191cbef63 Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Fix distance field shaders for ES3.2Tomi Korpipää2019-04-252-2/+2
| | | | | | | Task-number: QT3DS-3352 Change-Id: Ic0d2e7910079a6c263f6e59b81ef0588a6455654 Reviewed-by: Jere Tuliniemi <jere.tuliniemi@qt.io> Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io>
* Fix crash in editor when using qml streamAntti Määttä2019-04-246-1/+29
| | | | | | | | | | | | | | | | | | | | The crash occurs due to stack overflow due to recursive subpresentation initialization in runtime codes. This happens because the qml subpresentation has the same id as the presentation filename, which is assigned to default initial id from the presentation filename. When the layer, which is using the qml subpresentation, is initialized in the runtime, it gets the uip presentation instead of the qml subpresentation. The same begins to happen recursively. Add the ability to change the initial presentation id from the surface viewer api, which is used to render the subpresentations in the editor so that it gets valid id instead of the id from filename. Task-number: QT3DS-3345 Change-Id: I45f3a8ce9b5dc030f120baa1a8aed6c284ea7e3c Reviewed-by: Jere Tuliniemi <jere.tuliniemi@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
* Implement datainput getter API for OpenGL runtimeJanne Kangas2019-04-1611-177/+298
| | | | | | | | | Partially implements RT2 feature parity for datainput getters. (Min/max property is not exposed to QML side.) Task-id: QT3DS-3258 Change-Id: I9cce3e98289c3cac8d2c774bb53eb75f445b6e17 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Add distance field rendering to OpenGL runtimeJere Tuliniemi2019-04-1634-50/+2687
| | | | | | | | | | | | | | The old text rendering remains in the background and is used to render clipped text, since that feature is not yet implemented for distance field fonts. Building the runtime with Qt version older than 5.12.2 also causes a fallback to the old text rendering. Depth pass rendering also needs to be redone in the future to avoid another full render pass. Task-number: QT3DS-3210 Change-Id: Ib7666c437d23ae25e1872682f010df3721476a14 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Flatten OpenGL source directory hierarchyPasi Keränen2019-04-15718-643/+640
| | | | | | | | | | Flatten Source,Include and PrivateInclude directories away. Replace camelcase directory names with lowercase names. Remove random Qt3DS prefixes from directory names. Task-number: QT3DS-16 Change-Id: I5b23349232c760afa9a8efcc5e8945ee19d2e31a Reviewed-by: Pasi Keränen <pasi.keranen@qt.io>
* clean up and format MetaData.xmlMahmoud Badri2019-04-111-242/+275
| | | | | | | | | | | | | | Also: - Fix a crash when setting a standard material. - remove visible property from materials. - add an inspector group "camera properties" to the camera and move the orthogonal setting there. Task-number: QT3DS-3319 Change-Id: I5830248b4e610231124a6c588a2563c757b066c1 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Antti Määttä <antti.maatta@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Support variants property on componentsMahmoud Badri2019-04-111-10/+25
| | | | | | | | | | | | | | | Also the following tasks are done in this commit: - show active root component properties in the inspector. - fix a crash when opening the light scope drop down. - remove a lot of dynamic casts and useless code and cleanups, mainly from the inspector classes. There is still more dynamic casts and memory leaks that should be tackled in another commit. - move a method to more appropriate place. Change-Id: I5bec3858ba34d307ab6236ee665f1474302c1f57 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Antti Määttä <antti.maatta@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Add variant support to OpenGL runtimePasi Keränen2019-04-1114-254/+509
| | | | | | | Task-number: QT3DS-3193 Change-Id: I5606d452104659e60ecbc2e8e08ec3e6f5b15cbc Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Add support for KTX texturesAntti Määttä2019-04-0914-66/+645
| | | | | | Task-number: QT3DS-3205 Change-Id: If54d1404b934c6ae7de704884ba0afdf71419170 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>