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]
impl<'a, 'b> Builder<'a, 'b>
pub fn new(app: &'a App) -> Self
[src]
pub fn new(app: &'a App) -> Self
Begin building a new OpenGL window.
pub fn window(self, window: WindowBuilder) -> Self
[src]
pub fn window(self, window: WindowBuilder) -> Self
Build the GL window with some custom window parameters.
pub fn context<'c>(self, context: ContextBuilder<'c>) -> Builder<'a, 'c>
[src]
pub fn context<'c>(self, context: ContextBuilder<'c>) -> Builder<'a, 'c>
Build the GL window with some custom OpenGL Context parameters.
pub fn build(self) -> Result<Id, DisplayCreationError>
[src]
pub fn build(self) -> Result<Id, DisplayCreationError>
Builds the window, inserts it into the App
's display map and returns the unique ID.
pub fn with_dimensions(self, width: u32, height: u32) -> Self
[src]
pub fn with_dimensions(self, width: u32, height: u32) -> Self
Requests the window to be specific dimensions pixels.
pub fn with_min_dimensions(self, width: u32, height: u32) -> Self
[src]
pub fn with_min_dimensions(self, width: u32, height: u32) -> Self
Set the minimum dimensions in pixels for the window.
pub fn with_max_dimensions(self, width: u32, height: u32) -> Self
[src]
pub fn with_max_dimensions(self, width: u32, height: u32) -> Self
Set the maximum dimensions in pixels for the window.
pub fn with_title<T>(self, title: T) -> Self where
T: Into<String>,
[src]
pub fn with_title<T>(self, title: T) -> Self where
T: Into<String>,
Requests a specific title for the window.
pub fn with_fullscreen(self, monitor: Option<MonitorId>) -> Self
[src]
pub fn with_fullscreen(self, monitor: Option<MonitorId>) -> Self
Sets the window fullscreen state.
None means a normal window, Some(MonitorId) means a fullscreen window on that specific monitor.
pub fn with_maximized(self, maximized: bool) -> Self
[src]
pub fn with_maximized(self, maximized: bool) -> Self
Requests maximized mode.
pub fn with_visibility(self, visible: bool) -> Self
[src]
pub fn with_visibility(self, visible: bool) -> Self
Sets whether the window will be initially hidden or visible.
pub fn with_transparency(self, transparent: bool) -> Self
[src]
pub fn with_transparency(self, transparent: bool) -> Self
Sets whether the background of the window should be transparent.
pub fn with_decorations(self, decorations: bool) -> Self
[src]
pub fn with_decorations(self, decorations: bool) -> Self
Sets whether the window should have a border, a title bar, etc.
pub fn with_multitouch(self) -> Self
[src]
pub fn with_multitouch(self) -> Self
Enables multitouch.
pub fn with_gl(self, request: GlRequest) -> Self
[src]
pub fn with_gl(self, request: GlRequest) -> Self
Sets how the backend should choose the OpenGL API and version.
pub fn with_gl_profile(self, profile: GlProfile) -> Self
[src]
pub fn with_gl_profile(self, profile: GlProfile) -> Self
Sets the desired OpenGL context profile.
pub fn with_gl_debug_flag(self, flag: bool) -> Self
[src]
pub fn with_gl_debug_flag(self, flag: bool) -> Self
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
.
pub fn with_gl_robustness(self, robustness: Robustness) -> Self
[src]
pub fn with_gl_robustness(self, robustness: Robustness) -> Self
Sets the robustness of the OpenGL context. See the docs of Robustness
.
pub fn with_vsync(self, vsync: bool) -> Self
[src]
pub fn with_vsync(self, vsync: bool) -> Self
Requests that the window has vsync enabled.
By default, vsync is not enabled.
pub fn with_multisampling(self, samples: u16) -> Self
[src]
pub fn with_multisampling(self, samples: u16) -> Self
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.
pub fn with_depth_buffer(self, bits: u8) -> Self
[src]
pub fn with_depth_buffer(self, bits: u8) -> Self
Sets the number of bits in the depth buffer.
pub fn with_stencil_buffer(self, bits: u8) -> Self
[src]
pub fn with_stencil_buffer(self, bits: u8) -> Self
Sets the number of bits in the stencil buffer.
pub fn with_pixel_format(self, color_bits: u8, alpha_bits: u8) -> Self
[src]
pub fn with_pixel_format(self, color_bits: u8, alpha_bits: u8) -> Self
Sets the number of bits in the color buffer.
pub fn with_stereoscopy(self) -> Self
[src]
pub fn with_stereoscopy(self) -> Self
Request the backend to be stereoscopic.
pub fn with_srgb(self, enabled: bool) -> Self
[src]
pub fn with_srgb(self, enabled: bool) -> Self
Sets whether sRGB should be enabled on the window.
The default value is false
.