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]

[src]

Initializes a new WindowBuilder with default values.

[src]

Requests the window to be of specific dimensions.

Width and height are in pixels.

[src]

Sets a minimum dimension size for the window

Width and height are in pixels.

[src]

Sets a maximum dimension size for the window

Width and height are in pixels.

[src]

Requests a specific title for the window.

[src]

Requests fullscreen mode.

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

[src]

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.

[src]

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

[src]

Sets the desired OpenGL context profile.

[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.

[src]

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

[src]

Requests that the window has vsync enabled.

[src]

Sets whether the window will be initially hidden or visible.

[src]

Sets the multisampling level to request.

Panic

Will panic if samples is not a power of two.

[src]

Sets the number of bits in the depth buffer.

[src]

Sets the number of bits in the stencil buffer.

[src]

Sets the number of bits in the color buffer.

[src]

Request the backend to be stereoscopic.

[src]

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

[src]

Sets whether the background of the window should be transparent.

[src]

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

[src]

Enables multitouch

[src]

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

[src]

Sets the parent window

[src]

Builds the window.

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

[src]

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]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more