[−][src]Struct ds2d::ContextBuilder
The entry point of the ds2d
library that sets up the various subsystems,
and in particular a window with a graphics context.
Implementations
impl ContextBuilder
[src]
pub fn new() -> Self
[src]
pub fn title<T: Into<String>>(self, title: T) -> Self
[src]
Set the title of the game window.
pub fn logical_size(self, size: LogicalSize<f64>) -> Self
[src]
Set the logical size of the game window (before being scaled by the DPI factor). TODO: is there a way of providing a physical size for initialization?
pub fn debug(self, debug: bool) -> Self
[src]
Enable additional debug checks and output.
Defaults to cfg!(debug_assertions)
.
pub fn build(self) -> Result<(EventLoop<()>, Context), InitError>
[src]
Create a window with an OpenGL context, and the corresponding event loop.
The returned ds2d::Context
can be used for initializing the Game state
before starting the game loop.
Trait Implementations
impl Default for ContextBuilder
[src]
Auto Trait Implementations
impl RefUnwindSafe for ContextBuilder
impl Send for ContextBuilder
impl Sync for ContextBuilder
impl Unpin for ContextBuilder
impl UnwindSafe for ContextBuilder
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>,