Files
magnum-boostrap-qtquick/README.md
2020-06-23 16:39:30 -06:00

936 B

Magnum + Qt Quick bootstrap

This app demonstrates usage if Magnum rendering engine within a Qt Quick application.

Common pitfalls

Header inclusion order

Follow a simple rules: Always include Magnum's headers first. If you're including your own headers, make sure that this rules is preserved. 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 unbdefining.

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.