renderdoc script

This commit is contained in:
2019-07-27 01:47:05 +02:00
parent dc3a3018c5
commit e26c64c253
5 changed files with 26 additions and 5 deletions

9
build/renderdoc.ps1 Normal file
View File

@@ -0,0 +1,9 @@
cargo build
$base_path = Get-Location
$capture_dir = "$base_path\build\capture"
renderdoccli.exe capture --working-dir $base_path --wait-for-exit --capture-file "$capture_dir\cap" "$base_path\target\debug\rust-engine.exe"
$latest_capture_file = Get-ChildItem -Path $capture_dir | Sort-Object LastAccessTime -Descending | Select-Object -First 1
$cap_name = $latest_capture_file.name
$timespan = ((Get-Date) - $latest_capture_file.LastWriteTime)
Write-Output "Opening $capture_dir\$cap_name from $timespan ago"
renderdocgui.exe "$capture_dir\$cap_name"