pub struct Context { /* private fields */ }
Implementations§
Source§impl Context
impl Context
Sourcepub fn new() -> Option<Self>
pub fn new() -> Option<Self>
Examples found in repository?
examples/version.rs (line 7)
6fn main() {
7 let ctx = renderdoc_api::Context::new();
8 match ctx {
9 Some(ctx) => {
10 let (x, y, z) = ctx.get_api_version();
11 println!("Found renderdoc {}.{}.{}", x, y, z);
12 }
13 None => {
14 println!("Couldn't find renderdoc");
15 }
16 }
17 thread::sleep(Duration::from_secs(5));
18}
Sourcepub fn get_api_version(&self) -> (c_int, c_int, c_int)
pub fn get_api_version(&self) -> (c_int, c_int, c_int)
Examples found in repository?
examples/version.rs (line 10)
6fn main() {
7 let ctx = renderdoc_api::Context::new();
8 match ctx {
9 Some(ctx) => {
10 let (x, y, z) = ctx.get_api_version();
11 println!("Found renderdoc {}.{}.{}", x, y, z);
12 }
13 None => {
14 println!("Couldn't find renderdoc");
15 }
16 }
17 thread::sleep(Duration::from_secs(5));
18}
Sourcepub unsafe fn start_frame_capture(
&self,
device: RENDERDOC_DevicePointer,
window: RENDERDOC_WindowHandle,
)
pub unsafe fn start_frame_capture( &self, device: RENDERDOC_DevicePointer, window: RENDERDOC_WindowHandle, )
Immediately begin a frame capture
§Safety
device
and window
must be pointers supported by renderdoc for their respective types, or null.
pub fn is_frame_capturing(&self) -> bool
Sourcepub unsafe fn end_frame_capture(
&self,
device: RENDERDOC_DevicePointer,
window: RENDERDOC_WindowHandle,
)
pub unsafe fn end_frame_capture( &self, device: RENDERDOC_DevicePointer, window: RENDERDOC_WindowHandle, )
Complete a frame capture began with start_frame_capture
§Safety
device
and window
must be pointers supported by renderdoc for their respective types, or null.
Auto Trait Implementations§
impl Freeze for Context
impl RefUnwindSafe for Context
impl Send for Context
impl Sync for Context
impl Unpin for Context
impl UnwindSafe for Context
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more