Module vulkano::instance::debug [] [src]

Debug callback called by validation layers.

When working on an application, it is recommended to register a debug callback. This callback will be called by validation layers whenever necessary to warn you about invalid API usages or performance problems.

Note that the vulkano library can also emit messages to warn you about performance issues. TODO: ^ that's not the case yet, need to choose whether we keep this idea

Example

use vulkano::instance::debug::DebugCallback;
 
let _callback = DebugCallback::errors_and_warnings(&instance, |msg| {
    println!("Debug callback: {:?}", msg.description);
}).ok();Run

Note that you must keep the _callback object alive for as long as you want your callback to be callable. If you don't store the return value of DebugCallback's constructor in a variable, it will be immediately destroyed and your callback will not work.

Structs

DebugCallback

Registration of a callback called by validation layers.

Message

A message received by the callback.

MessageTypes

Type of message.

Enums

DebugCallbackCreationError

Error that can happen when creating a debug callback.