In the summary of actual 3D Game Development, the editor is an important part of the machine. A good and robust Editor, Kawaii is a project that gets twice the result with half the effort. On the contrary, an editor with a lot of bugs that does not focus on operational habits will not only make the project more difficult, but also weaken the enthusiasm of developers and even allow developers to reject the project.
Download
The Qt/3D source code is hosted in Gitorious and can be captured directly using git.
Git clone git: // gitorious.org/qt-labs/qt3d.gitis not clear about what is the cause. In the example of gitin, it often fails (fix me ). You may need to clone your own repository and then use the git ssh method for crawling. Download the compressed package (qt-labs-qt3d-master.tar.gz ).
Preparations before Compilation
Because Qt/3D uses many private files in Qt source code, we need to have a self-compiled Qt environment.
Windows
In Windows, this should be okay.
Download the source code, decompress it to a directory (such as D: \ Qt4.7.4), and then
- configure
- make
Linux
In linux, there is a small problem.
For example, download the source code ~ /Qt4.7.4
- configure
- make & make install
At this time, all the private files of Qt are still in ~ /Qt4.7.4, but Qt is installed to/usr/local // usr/local/Trolltech/Qt-4.7.4. What should I do in this situation?
It is not clear that there is no better way (specify prefix When configuring Qt ?), Personally (set the environment variable before compiling Qt/3D)
- export MYQTDIR=/home/debao/Qt4.7.4
- export
- CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:$MYQTDIR/include:$MYQTDIR/include/QtCore/:$MYQTDIR/
- include/QtDeclarative/:$MYQTDIR/include/QtGui/:$MYQTDIR/include/QtDbusQt/3D
The QtDbus module used by a plug-in. Therefore, you must ensure that this module is enabled during Qt compilation. For ubuntu, Qt installs a libdbus-1-dev before configure
Note: Finally, you can add the-developer-build option in configure to implement the results in windows. Dbzhang800 2011.06.01
Compile
The shadow build method provided in Qt/3D Manual (For details, refer to the shadow build method of qmake ).
If we do not use shadow build, directly go to the source code directory.
- qmake opengl.pro
- make
- make install
That's all.
As needed, you may need to set the search PATH for the dynamic library, LD_LIBRARY_PATH in linux and PATH in windows.