pub trait GlWindow {
    fn build_surface_attributes(
        &self,
        builder: SurfaceAttributesBuilder<WindowSurface>
    ) -> SurfaceAttributes<WindowSurface>; fn resize_surface(
        &self,
        surface: &Surface<impl SurfaceTypeTrait + ResizeableSurface>,
        context: &PossiblyCurrentContext
    ); }
Expand description

Window extensions for working with glutin surfaces.

Required Methods§

source

fn build_surface_attributes(
    &self,
    builder: SurfaceAttributesBuilder<WindowSurface>
) -> SurfaceAttributes<WindowSurface>

Build the surface attributes suitable to create a window surface.

Panics

Panics if either window inner dimension is zero.

Example
use glutin_winit::GlWindow;

let attrs = winit_window.build_surface_attributes(<_>::default());
source

fn resize_surface(
    &self,
    surface: &Surface<impl SurfaceTypeTrait + ResizeableSurface>,
    context: &PossiblyCurrentContext
)

Resize the surface to the window inner size.

No-op if either window size is zero.

Example
use glutin_winit::GlWindow;

winit_window.resize_surface(&gl_surface, &gl_context);

Implementations on Foreign Types§

source§

impl GlWindow for Window

Implementors§