# 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.
