pub trait GlWindow {
// Required methods
fn build_surface_attributes(
&self,
builder: SurfaceAttributesBuilder<WindowSurface>,
) -> Result<SurfaceAttributes<WindowSurface>, HandleError>;
fn resize_surface(
&self,
surface: &Surface<impl SurfaceTypeTrait + ResizeableSurface>,
context: &PossiblyCurrentContext,
);
}
Required Methods§
Sourcefn build_surface_attributes(
&self,
builder: SurfaceAttributesBuilder<WindowSurface>,
) -> Result<SurfaceAttributes<WindowSurface>, HandleError>
fn build_surface_attributes( &self, builder: SurfaceAttributesBuilder<WindowSurface>, ) -> Result<SurfaceAttributes<WindowSurface>, HandleError>
Sourcefn resize_surface(
&self,
surface: &Surface<impl SurfaceTypeTrait + ResizeableSurface>,
context: &PossiblyCurrentContext,
)
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);
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.