pub struct Context<T> { /* private fields */ }
Implementations
sourceimpl<T> Context<T> where
T: Backend + Clone,
impl<T> Context<T> where
T: Backend + Clone,
pub fn new(backend: T) -> Result<Self>
pub fn create_factory(&self) -> Factory
pub unsafe fn create_render_target<U>(
&self,
target: &U
) -> Result<T::RenderTarget>
pub fn set_dpi(&self, dpi: f32)
pub fn draw<R>(
&self,
target: &T::RenderTarget,
f: impl FnOnce(&DrawCommand<'_>) -> R
) -> Result<R>
sourceimpl Context<Direct2D>
impl Context<Direct2D>
pub fn create_back_buffers(&self) -> Result<Vec<RenderTarget>>
pub fn resize(&self, size: impl Into<Size<u32>>)
pub fn swap_chain(&self) -> &IDXGISwapChain1
pub fn present(
&self,
dirty_rects: Option<&[ScreenRect]>,
scroll: Option<Scroll>
)
sourceimpl Context<Direct3D11>
impl Context<Direct3D11>
pub unsafe fn create_back_buffers<T>(
&self,
swap_chain: &T
) -> Result<Vec<RenderTarget>>
sourceimpl Context<Direct3D12>
impl Context<Direct3D12>
pub unsafe fn create_back_buffers<T>(
&self,
swap_chain: &T
) -> Result<Vec<RenderTarget>>
pub fn flush(&self)
Trait Implementations
Auto Trait Implementations
impl<T> RefUnwindSafe for Context<T> where
T: RefUnwindSafe,
impl<T> !Send for Context<T>
impl<T> !Sync for Context<T>
impl<T> Unpin for Context<T> where
T: Unpin,
impl<T> UnwindSafe for Context<T> where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more