Logs and validation

Qt automatically receives messages from the Vulkan library and puts them into Qt's own logging system. The critical errors will be passed to qWarning(), so they will appear in the application output by default. However, Qt also logs additional information that can be useful when debugging. This information is hidden by default, but you can make it visible by adding the following line to the main() function just after the construction of QGuiApplication:

QLoggingCategory::setFilterRules(QStringLiteral("qt.vulkan=true"));

The Vulkan API does not perform any sanity checks by default. If you pass an invalid parameter to a Vulkan API function, the application may silently crash, or work inconsistently. However, you can enable ...

Get Game Programming using Qt 5 Beginner's Guide - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.