Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Classes principales  ·  Annotées  ·  Classes groupées  ·  Modules  ·  Fonctions  · 

Writing a scene format plug-in for Qt3D

Plugin architecture for scene formats to be deprecated.

In the original design for Qt3D we considered loading of different file formats to be analagous to loading different image formats, and thus it was written following the pattern of the libpng, and libtiff format that exists in QtBase. This meant scanning the plugins directory for a sceneformat loader plugin that supported the given file type, and if one was found loading that and then reading the file.

However this is a poor match for the actual job and slows down the loading of assets as the loader has to resolve a plugin before it can actually start loading the asset.

With the support provided by Asset Importer a wide array of scene formats is supported, and it makes most sense for new formats that are not currently supported to be added and upstreamed to Asset Importer.

Another consideration for the deprecation process is that our QML bindings depend on a structured scene format. Scene-nodes, materials and effects must be included in the scene using a set and known schema. With the original plug-in API the idea was that plugins would be free to do any kind of rendering or representation and thus this schema is not able to be supported. This means that plugins would be created that could not be rendered or would be buggy and inconsistent in QML.

With upcoming support for animations this problem becomes even more pressing since animations formats in asset files must also be exposed to our QML bindings.

The QGLAbstractScene class will stay, possibly with some modifications but the plug-in apparatus will be dismantled and thus loading of assets via a plugin architecture will removed in favour of a direct loading functionality, probably kept in a seperate library linked at compile time. This should mean smaller code, faster loading and better support for animations and future functionality.

The bezier plugin will be retained and we will look at contributing it to Asset Importer if the format is general enough.

Since deprecation of the sceneformat plugin API is a considerable change to our API's we will not do it lightly. So far however we have had no contributions to the sceneformats and no-one has asked about it, or used it, despite this tutorial existing. At present it will be marked deprecated and in our next release cycle it will be removed altogether.

In the meantime, this tutorial is out of date and misleading and has been removed. Until it can be re-written, please refer to the source code of the Asset Importer Plugin Example in src/plugins/sceneformats/assimp.

Return to the main Tutorials page.

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt 5.0-snapshot
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web