Struct glutin::WindowBuilder [] [src]

pub struct WindowBuilder<'a> {
    pub window: WindowAttributes,
    pub opengl: GlAttributes<&'a Window>,
    // some fields omitted
}

Object that allows you to build windows.

Fields

The attributes to use to create the window.

The attributes to use to create the context.

Methods

impl<'a> WindowBuilder<'a>
[src]

Initializes a new WindowBuilder with default values.

Requests the window to be of specific dimensions.

Width and height are in pixels.

Sets a minimum dimension size for the window

Width and height are in pixels.

Sets a maximum dimension size for the window

Width and height are in pixels.

Requests a specific title for the window.

Requests fullscreen mode.

If you don't specify dimensions for the window, it will match the monitor's.

The created window will share all its OpenGL objects with the window in the parameter.

There are some exceptions, like FBOs or VAOs. See the OpenGL documentation.

Sets how the backend should choose the OpenGL API and version.

Sets the desired OpenGL context profile.

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.

Sets the robustness of the OpenGL context. See the docs of Robustness.

Requests that the window has vsync enabled.

Sets whether the window will be initially hidden or visible.

Sets the multisampling level to request.

Panic

Will panic if samples is not a power of two.

Sets the number of bits in the depth buffer.

Sets the number of bits in the stencil buffer.

Sets the number of bits in the color buffer.

Request the backend to be stereoscopic.

Sets whether sRGB should be enabled on the window. None means "I don't care".

Sets whether the background of the window should be transparent.

Sets whether the window should have a border, a title bar, etc.

Enables multitouch

Sets the icon for the window. The supplied path must reference a PNG file.

Sets the parent window

Builds the window.

Error should be very rare and only occur in case of permission denied, incompatible system, out of memory, etc.

Builds the window.

The context is build in a strict way. That means that if the backend couldn't give you what you requested, an Err will be returned.

Trait Implementations

impl<'a> WindowBuilderExt for WindowBuilder<'a>
[src]

impl<'a> Clone for WindowBuilder<'a>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more