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 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_render_target(
&self,
hwnd: *const c_void,
size: impl Into<Size<u32>>
) -> Result<RenderTarget>
sourceimpl Context<Direct3D11>
impl Context<Direct3D11>
pub unsafe fn create_back_buffers<T>(
&self,
swap_chain: &T
) -> Result<Vec<RenderTarget>>
pub unsafe fn create_render_target<T>(&self, target: &T) -> Result<RenderTarget>
sourceimpl Context<Direct3D12>
impl Context<Direct3D12>
pub unsafe fn create_back_buffers<T>(
&self,
swap_chain: &T
) -> Result<Vec<RenderTarget>>
pub unsafe fn create_render_target<T>(&self, target: &T) -> Result<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