This commit is contained in:
2020-06-27 19:45:43 -06:00
commit 5b0ba9f1db
16 changed files with 2073 additions and 0 deletions

26
README.md Normal file
View File

@@ -0,0 +1,26 @@
# Magnum + Qt Quick bootstrap
![Screen](images/screen.gif)
This app demonstrates Magnum rendering engine within a Qt Quick application, using
a shared framebuffer object..
## Common pitfalls
### Header inclusion order
Follow one simple rule: Always include Magnum's headers first. If you're including
your own headers, make sure that this rules is obeyed. It's very easy to violate it.
Common symptom is compiler errors about missing declarations for `glFinish`, `glFlush`
and `glGetError`, which some Qt headers (`QOpenGLFunctions`) are undefining.
For a bomb-proof solution, make a header file that includes all of your Magnum and Qt
dependencies in correct order.
### CMake AUTOMOC
CMake detects a Qt project and enables `moc` preprocessor automatically for certain
source files. This may not play well with Magnum's headers. If you see `moc` related
build errors in Magnum's headers, improve separation between Magnum and Qt code, ie.
move Magnum code to its own source files.