Struct piston_window::PistonWindow [] [src]

pub struct PistonWindow<W: Window = GlutinWindow> {
    pub window: W,
    pub encoder: GfxEncoder,
    pub device: Device,
    pub output_color: RenderTargetView<Resources, Srgba8>,
    pub output_stencil: DepthStencilView<Resources, DepthStencil>,
    pub g2d: Gfx2d<Resources>,
    pub events: WindowEvents,
    pub factory: Factory,
}

Contains everything required for controlling window, graphics, event loop.

Fields

The window.

GFX encoder.

GFX device.

Output frame buffer.

Output stencil buffer.

Gfx2d.

Event loop state.

The factory that was created along with the device.

Methods

impl<W> PistonWindow<W> where W: Window, W::Event: GenericEvent
[src]

Creates a new piston window.

Renders 2D graphics.

Renders 3D graphics.

Returns next event. Cleans up after rendering and resizes frame buffers.

Let window handle new event. Cleans up after rendering and resizes frame buffers.

Trait Implementations

impl<W> BuildFromWindowSettings for PistonWindow<W> where W: Window + OpenGLWindow + BuildFromWindowSettings,
        W::Event: GenericEvent
[src]

Builds the window from a WindowSettings object. Read more

impl<W> Window for PistonWindow<W> where W: Window
[src]

The event type the window uses for incoming input. Read more

Returns true if the window should close.

Tells the window to close or stay open.

Gets the size of the window.

Gets the draw size of the window. Read more

Swaps render buffers. Read more

Wait indefinitely for an event to be available from the window. Read more

Wait for an event to be available from the window or for the specified timeout to be reached. Read more

Polls an event from the window. Read more

impl<W> AdvancedWindow for PistonWindow<W> where W: AdvancedWindow
[src]

Gets a copy of the title of the window.

Sets the title of the window.

Gets whether to exit when pressing esc. Read more

Sets whether to exit when pressing esc. Read more

Sets whether to capture/grab the cursor. Read more

Shows the window. Read more

Hides the window. Read more

Gets the position of window. Read more

Sets the position of window. Read more

Sets title on window. Read more

Sets whether to exit when pressing the Esc button. Read more

Sets whether to capture/grab the cursor. Read more

Sets the position of window. Read more

impl<W> EventLoop for PistonWindow<W> where W: Window
[src]

The number of updates per second Read more

The maximum number of frames per second Read more

Enable or disable automatic swapping of buffers.

Enable or disable benchmark mode. When enabled, it will render and update without sleep and ignore input. Used to test performance by playing through as fast as possible. Read more

The number of updates per second Read more

The maximum number of frames per second Read more

Enable or disable automatic swapping of buffers.

Enable or disable benchmark mode. When enabled, it will render and update without sleep and ignore input. Used to test performance by playing through as fast as possible. Read more