Qt3D version of LearnOpenGL examples, currently works with Qt5.9. I created this repo aiming to understand how Qt3D works.
Pure QML version, use qmlscene to run with default OpenGL Context:
Try it with Qt5.9+:
qmlscene -I https://raw.githubusercontent.com/MidoriYakumo/qml-virtualkey/master/ https://raw.githubusercontent.com/MidoriYakumo/learnopengl-qt3d/master/qml/app.qml
Compiled version, context set to GL4.3(Desktop)/GLES3.0(Mobile):
learnopengl-qt3d can be launched from either qmlscene or compiled binary file.
Main qml file for qmlscene/binary/QmlCreator:
-
app.qml: main window with line chart FPS display
-
main.qml: QuickItem as root + text FPS display
With one keyword as arguments you can specify the sample to be launched:
- qmlscene skybox app.qml
- ./learnopengl-qt3d geometry
-
Some large assets from the website is downloaded by qmake script(*nix only), connection is required at the first build or after updated. Use CONFIG += no_assets to skip and enable local filesystem routing(may lead to crash). See main.cpp, assets.pri, Resources.qml for details.
-
leanopengl uses a little different lighting model from Qt3D default model, to rendering models for a better result, please slightly modify the ka, kd in mtl files
-
run qmltestrunner under qml/tests to perform unit tests or to generate screenshots.
- Hello Window : works
- Hello Triangle : works
- Shaders : works
- Texture : works
- Transformations : works
- Coordinate Systems : works
- Camera : works
- Colors : works
- Basic Lighting : works
- Materials : works
- Lighting-maps : works
- Light-casters : works