Struct nannou::window::Builder
[−]
[src]
pub struct Builder<'a, 'b> { /* fields omitted */ }
For building an OpenGL window.
Window parameters can be specified via the window
method.
OpenGL context parameters can be specified via the context
method.
Methods
impl<'a, 'b> Builder<'a, 'b>
[src]
fn new(app: &'a App) -> Self
[src]
Begin building a new OpenGL window.
fn window(self, window: WindowBuilder) -> Self
[src]
Build the GL window with some custom window parameters.
fn context<'c>(self, context: ContextBuilder<'c>) -> Builder<'a, 'c>
[src]
Build the GL window with some custom OpenGL Context parameters.
fn build(self) -> Result<Id, DisplayCreationError>
[src]
Builds the window, inserts it into the App
's display map and returns the unique ID.
fn with_dimensions(self, width: u32, height: u32) -> Self
[src]
Requests the window to be specific dimensions pixels.
fn with_min_dimensions(self, width: u32, height: u32) -> Self
[src]
Set the minimum dimensions in pixels for the window.
fn with_max_dimensions(self, width: u32, height: u32) -> Self
[src]
Set the maximum dimensions in pixels for the window.
fn with_title<T>(self, title: T) -> Self where
T: Into<String>,
[src]
T: Into<String>,
Requests a specific title for the window.
fn with_fullscreen(self, monitor: Option<MonitorId>) -> Self
[src]
Sets the window fullscreen state.
None means a normal window, Some(MonitorId) means a fullscreen window on that specific monitor.
fn with_maximized(self, maximized: bool) -> Self
[src]
Requests maximized mode.
fn with_visibility(self, visible: bool) -> Self
[src]
Sets whether the window will be initially hidden or visible.
fn with_transparency(self, transparent: bool) -> Self
[src]
Sets whether the background of the window should be transparent.
fn with_decorations(self, decorations: bool) -> Self
[src]
Sets whether the window should have a border, a title bar, etc.
fn with_multitouch(self) -> Self
[src]
Enables multitouch.
fn with_gl(self, request: GlRequest) -> Self
[src]
Sets how the backend should choose the OpenGL API and version.
fn with_gl_profile(self, profile: GlProfile) -> Self
[src]
Sets the desired OpenGL context profile.
fn with_gl_debug_flag(self, flag: bool) -> Self
[src]
Sets the debug flag for the OpenGL context.
The default value for this flag is cfg!(debug_assertions)
, which means that it's enabled
when you run cargo build
and disabled when you run cargo build --release
.
fn with_gl_robustness(self, robustness: Robustness) -> Self
[src]
Sets the robustness of the OpenGL context. See the docs of Robustness
.
fn with_vsync(self, vsync: bool) -> Self
[src]
Requests that the window has vsync enabled.
By default, vsync is not enabled.
fn with_multisampling(self, samples: u16) -> Self
[src]
Sets the multisampling level to request.
A value of 0
indicates that multisampling must not be enabled.
Panics if samples
is not a power of 2.
fn with_depth_buffer(self, bits: u8) -> Self
[src]
Sets the number of bits in the depth buffer.
fn with_stencil_buffer(self, bits: u8) -> Self
[src]
Sets the number of bits in the stencil buffer.
fn with_pixel_format(self, color_bits: u8, alpha_bits: u8) -> Self
[src]
Sets the number of bits in the color buffer.
fn with_stereoscopy(self) -> Self
[src]
Request the backend to be stereoscopic.
fn with_srgb(self, enabled: bool) -> Self
[src]
Sets whether sRGB should be enabled on the window.
The default value is false
.