Integrate with RenderDoc on winit-less captures (#627)

This commit is contained in:
Dzmitry Malyshau authored and GitHub committed 2020-05-01 15:34:32 -04:00
1 parent 0a0ef9a100
commit 5bbe6ec38c
4 files changed
+66 -7

No files matched your search

+14 -2
View File
@@ -427,6 +427,10 @@ fn main() {
env_logger::init();
#[cfg(feature = "renderdoc")]
let mut rd = renderdoc::RenderDoc::<renderdoc::V110>::new()
.expect("Failed to connect to RenderDoc: are you running without it?");
//TODO: setting for the backend bits
//TODO: setting for the target frame, or controls
@@ -492,8 +496,16 @@ fn main() {
log::info!("Executing actions");
#[cfg(not(feature = "winit"))]
while let Some(action) = actions.pop() {
gfx_select!(device => global.process(device, action, &dir, &mut command_buffer_id_manager));
{
#[cfg(feature = "renderdoc")]
rd.start_frame_capture(ptr::null(), ptr::null());
while let Some(action) = actions.pop() {
gfx_select!(device => global.process(device, action, &dir, &mut command_buffer_id_manager));
}
#[cfg(feature = "renderdoc")]
rd.end_frame_capture(ptr::null(), ptr::null());
}
#[cfg(feature = "winit")]
{