[][src]Struct gpu::ContextBuilder

pub struct ContextBuilder { /* fields omitted */ }

A builder for Context.

Implementations

impl ContextBuilder[src]

pub fn new() -> Self[src]

Creates a new ContextBuilder with the default parameters: cursor = false vsync = true display = ContextDisplay::None

pub fn with_display(self, display: ContextDisplay) -> Self[src]

Sets the display kind of the Context.

pub fn cursor(self, cursor: bool) -> Self[src]

Sets if we want a cursor for the created Context.

pub fn vsync(self, vsync: bool) -> Self[src]

Sets if we want vsync for the created Context.

pub fn build(self) -> Context[src]

Creates a new Context with all the parameters specified in the ContextBuilder.

Trait Implementations

impl Default for ContextBuilder[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

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

impl<T, U> Into<U> for T where
    U: From<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.