[][src]Struct renderdoc::RenderDoc

#[repr(C)]
pub struct RenderDoc<V>(_, _);

An instance of the RenderDoc API with baseline version V.

Methods

impl<V: Version> RenderDoc<V>[src]

pub fn new() -> Result<Self, String>[src]

Initializes a new instance of the RenderDoc API.

pub unsafe fn raw_api(&self) -> *mut Entry[src]

Returns the raw entry point of the API.

Safety

Using the entry point structure directly will discard any thread safety provided by default with this library.

pub unsafe fn shutdown(self)[src]

Attempts to shut down RenderDoc.

Safety

Note that this will work correctly if done immediately after the dynamic library is loaded, before any API work happens. At that point, RenderDoc will remove its injected hooks and shut down. Behavior is undefined if this is called after any API functions have been called.

impl<V: HasPrevious> RenderDoc<V>[src]

pub fn downgrade(self) -> RenderDoc<V::Previous>[src]

Downgrades the current API version to the version immediately preceding it.

Examples

let current: RenderDoc<V112> = RenderDoc::new()?;
let previous: RenderDoc<V111> = current.downgrade();
// let older: RenderDoc<V100> = previous.downgrade(); // This line does not compile

impl RenderDoc<V100>[src]

pub fn get_api_version(&self) -> (u32, u32, u32)[src]

Returns the major, minor, and patch version numbers of the RenderDoc API currently in use.

Note that RenderDoc will usually provide a higher API version than the one requested by the user if it's backwards compatible.

Examples

let renderdoc: RenderDoc<V100> = RenderDoc::new()?;
let (major, minor, patch) = renderdoc.get_api_version();
assert_eq!(major, 1);

pub fn set_capture_option_f32(&mut self, opt: CaptureOption, val: f32)[src]

Sets the specified CaptureOption to the given f32 value.

Panics

This method will panic if the option and/or the value are invalid.

pub fn set_capture_option_u32(&mut self, opt: CaptureOption, val: u32)[src]

Sets the specified CaptureOption to the given u32 value.

Panics

This method will panic if the option and/or the value are invalid.

pub fn get_capture_option_f32(&self, opt: CaptureOption) -> f32[src]

Returns the value of the given CaptureOption as an f32 value.

Panics

This method will panic if the option is invalid.

pub fn get_capture_option_u32(&self, opt: CaptureOption) -> u32[src]

Returns the value of the given CaptureOption as a u32 value.

Panics

This method will panic if the option is invalid.

pub fn set_capture_keys<I: Into<InputButton> + Clone>(&mut self, keys: &[I])[src]

pub fn set_focus_toggle_keys<I: Into<InputButton> + Clone>(
    &mut self,
    keys: &[I]
)
[src]

pub fn unload_crash_handler(&mut self)[src]

pub fn get_overlay_bits(&self) -> OverlayBits[src]

pub fn mask_overlay_bits(&mut self, and: OverlayBits, or: OverlayBits)[src]

pub fn get_log_file_path_template(&self) -> &str[src]

pub fn set_log_file_path_template<P: AsRef<Path>>(&mut self, path_template: P)[src]

pub fn get_num_captures(&self) -> u32[src]

pub fn get_capture(&self, index: u32) -> Option<(String, u64)>[src]

pub fn trigger_capture(&mut self)[src]

Captures the next frame from the currently active window and API device.

Data is saved to a capture log file at the location specified via set_log_file_path_template().

pub fn is_remote_access_connected(&self) -> bool[src]

Returns whether the RenderDoc UI is connected to this application.

Examples

let renderdoc: RenderDoc<V100> = RenderDoc::new()?;
assert!(!renderdoc.is_remote_access_connected());

pub fn launch_replay_ui<'a, O>(
    &self,
    connect_immediately: bool,
    extra_opts: O
) -> Result<u32, String> where
    O: Into<Option<&'a str>>, 
[src]

Launches the replay UI associated with the RenderDoc library injected into the running application.

If connect_immediately is true, the replay window will automatically connect to this application once opened, ready to capture frames right away. Optional command-line arguments to the RenderDoc replay UI can be specified via the extra_opts parameter.

Returns the PID of the RenderDoc replay process on success.

Examples

let renderdoc: RenderDoc<V100> = RenderDoc::new()?;
let pid = renderdoc.launch_replay_ui(true, None)?;

pub fn set_active_window<D>(&mut self, dev: D, win: WindowHandle) where
    D: Into<DevicePointer>, 
[src]

pub fn start_frame_capture<D>(&mut self, dev: D, win: WindowHandle) where
    D: Into<DevicePointer>, 
[src]

pub fn is_frame_capturing(&self) -> bool[src]

Returns whether or not a frame capture is currently ongoing anywhere.

Examples

let renderdoc: RenderDoc<V100> = RenderDoc::new()?;
if renderdoc.is_frame_capturing() {
    println!("Frames are being captured.");
} else {
    println!("No frame capture is occurring.");
}

pub fn end_frame_capture<D>(&mut self, dev: D, win: WindowHandle) where
    D: Into<DevicePointer>, 
[src]

impl RenderDoc<V110>[src]

pub fn trigger_multi_frame_capture(&mut self, num_frames: u32)[src]

Captures the next n frames from the currently active window and API device.

Data is saved to a capture log file at the location specified via set_log_file_path_template().

impl RenderDoc<V111>[src]

pub fn is_remote_access_connected(&self) -> bool[src]

Deprecated since 1.1.1:

renamed to is_target_control_connected()

Returns whether the RenderDoc UI is connected to this application.

pub fn is_target_control_connected(&self) -> bool[src]

Returns whether the RenderDoc UI is connected to this application.

Examples

let renderdoc: RenderDoc<V111> = RenderDoc::new()?;
assert!(!renderdoc.is_target_control_connected());

impl RenderDoc<V112>[src]

pub fn get_capture_file_path_template(&self) -> &str[src]

pub fn set_capture_file_path_template<P: AsRef<Path>>(
    &mut self,
    path_template: P
)
[src]

impl RenderDoc<V120>[src]

pub fn set_capture_file_comments<'a, P, C>(&mut self, path: P, comments: C) where
    P: Into<Option<&'a str>>,
    C: AsRef<str>, 
[src]

impl RenderDoc<V140>[src]

pub fn discard_frame_capture<D>(&mut self, dev: D, win: WindowHandle) -> bool where
    D: Into<DevicePointer>, 
[src]

Ends capturing immediately and discard any data without saving to disk.

Returns true if the capture was discarded, or false if no capture is in progress.

Trait Implementations

impl<V: Eq> Eq for RenderDoc<V>[src]

impl<V: PartialEq> PartialEq<RenderDoc<V>> for RenderDoc<V>[src]

impl From<RenderDoc<V140>> for RenderDoc<V130> where
    Self: Sized
[src]

impl From<RenderDoc<V140>> for RenderDoc<V120> where
    Self: Sized
[src]

impl From<RenderDoc<V140>> for RenderDoc<V112> where
    Self: Sized
[src]

impl From<RenderDoc<V140>> for RenderDoc<V111> where
    Self: Sized
[src]

impl From<RenderDoc<V140>> for RenderDoc<V110> where
    Self: Sized
[src]

impl From<RenderDoc<V140>> for RenderDoc<V100> where
    Self: Sized
[src]

impl From<RenderDoc<V130>> for RenderDoc<V120> where
    Self: Sized
[src]

impl From<RenderDoc<V130>> for RenderDoc<V112> where
    Self: Sized
[src]

impl From<RenderDoc<V130>> for RenderDoc<V111> where
    Self: Sized
[src]

impl From<RenderDoc<V130>> for RenderDoc<V110> where
    Self: Sized
[src]

impl From<RenderDoc<V130>> for RenderDoc<V100> where
    Self: Sized
[src]

impl From<RenderDoc<V120>> for RenderDoc<V112> where
    Self: Sized
[src]

impl From<RenderDoc<V120>> for RenderDoc<V111> where
    Self: Sized
[src]

impl From<RenderDoc<V120>> for RenderDoc<V110> where
    Self: Sized
[src]

impl From<RenderDoc<V120>> for RenderDoc<V100> where
    Self: Sized
[src]

impl From<RenderDoc<V112>> for RenderDoc<V111> where
    Self: Sized
[src]

impl From<RenderDoc<V112>> for RenderDoc<V110> where
    Self: Sized
[src]

impl From<RenderDoc<V112>> for RenderDoc<V100> where
    Self: Sized
[src]

impl From<RenderDoc<V111>> for RenderDoc<V110> where
    Self: Sized
[src]

impl From<RenderDoc<V111>> for RenderDoc<V100> where
    Self: Sized
[src]

impl From<RenderDoc<V110>> for RenderDoc<V100> where
    Self: Sized
[src]

impl<V: HasPrevious> DerefMut for RenderDoc<V>[src]

impl<V: Hash> Hash for RenderDoc<V>[src]

impl<V: Version> Debug for RenderDoc<V>[src]

Auto Trait Implementations

impl<V> !Send for RenderDoc<V>

impl<V> Unpin for RenderDoc<V> where
    V: Unpin

impl<V> !Sync for RenderDoc<V>

impl<V> UnwindSafe for RenderDoc<V> where
    V: UnwindSafe

impl<V> RefUnwindSafe for RenderDoc<V> where
    V: RefUnwindSafe

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T