[−][src]Struct miniquad::graphics::Context
Methods
impl Context
[src]
pub fn new() -> Context
[src]
pub fn screen_size(&self) -> (f32, f32)
[src]
pub fn apply_pipeline(&mut self, pipeline: &Pipeline)
[src]
pub fn apply_scissor_rect(&mut self, x: i32, y: i32, w: i32, h: i32)
[src]
pub fn apply_bindings(&mut self, bindings: &Bindings)
[src]
pub fn apply_uniforms<U>(&mut self, uniforms: &U)
[src]
pub fn clear(
&self,
color: Option<(f32, f32, f32, f32)>,
depth: Option<f32>,
stencil: Option<i32>
)
[src]
&self,
color: Option<(f32, f32, f32, f32)>,
depth: Option<f32>,
stencil: Option<i32>
)
pub fn begin_default_pass(&mut self, action: PassAction)
[src]
start rendering to the default frame buffer
pub fn begin_pass(
&mut self,
pass: impl Into<Option<RenderPass>>,
action: PassAction
)
[src]
&mut self,
pass: impl Into<Option<RenderPass>>,
action: PassAction
)
start rendering to an offscreen framebuffer
pub fn end_render_pass(&mut self)
[src]
pub fn commit_frame(&mut self)
[src]
pub fn draw(&self, base_element: i32, num_elements: i32, num_instances: i32)
[src]
impl Context
[src]
pub fn quit(&self)
[src]
This function simply quits the application without giving the user a chance to intervene. Usually this might be called when the user clicks the 'Ok' button in a 'Really Quit?' dialog box
pub fn request_quit(&self)
[src]
Calling request_quit() will trigger "quit_requested_event" event , giving the user code a chance to intervene and cancel the pending quit process (for instance to show a 'Really Quit?' dialog box). If the event handler callback does nothing, the application will be quit as usual. To prevent this, call the function "cancel_quit()"" from inside the event handler.
pub fn cancel_quit(&self)
[src]
Cancels a pending quit request, either initiated by the user clicking the window close button, or programmatically by calling "request_quit()". The only place where calling this function makes sense is from inside the event handler callback when the "quit_requested_event" event has been received
Auto Trait Implementations
impl RefUnwindSafe for Context
impl Send for Context
impl Sync for Context
impl Unpin for Context
impl UnwindSafe for Context
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,