pub struct FramePrepareOptions {
pub display_size: [f32; 2],
pub delta_time: f32,
pub framebuffer_scale: Option<[f32; 2]>,
pub backend_flags: BackendFlags,
}Expand description
Options used by Context::prepare_frame.
Fields§
§display_size: [f32; 2]Main display size in pixels.
delta_time: f32Time elapsed since the previous frame, in seconds.
framebuffer_scale: Option<[f32; 2]>Optional framebuffer scale for HiDPI render targets.
backend_flags: BackendFlagsBackend capability flags to OR into the context before opening the frame.
Implementations§
Source§impl FramePrepareOptions
impl FramePrepareOptions
Sourcepub fn new(display_size: [f32; 2], delta_time: f32) -> Self
pub fn new(display_size: [f32; 2], delta_time: f32) -> Self
Create frame preparation options with display size and delta time.
Sourcepub fn framebuffer_scale(self, scale: [f32; 2]) -> Self
pub fn framebuffer_scale(self, scale: [f32; 2]) -> Self
Set the framebuffer scale used by the frame.
Sourcepub fn backend_flags(self, flags: BackendFlags) -> Self
pub fn backend_flags(self, flags: BackendFlags) -> Self
OR backend capability flags into the context before opening the frame.
Sourcepub fn renderer_has_textures(self) -> Self
pub fn renderer_has_textures(self) -> Self
Convenience for modern renderers that support ImGui 1.92 texture requests.
Trait Implementations§
Source§impl Clone for FramePrepareOptions
impl Clone for FramePrepareOptions
Source§fn clone(&self) -> FramePrepareOptions
fn clone(&self) -> FramePrepareOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FramePrepareOptions
impl Debug for FramePrepareOptions
impl Copy for FramePrepareOptions
Auto Trait Implementations§
impl Freeze for FramePrepareOptions
impl RefUnwindSafe for FramePrepareOptions
impl Send for FramePrepareOptions
impl Sync for FramePrepareOptions
impl Unpin for FramePrepareOptions
impl UnsafeUnpin for FramePrepareOptions
impl UnwindSafe for FramePrepareOptions
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