Take a reference to a window in GraphicsContext::new, like glutin and wgpu

This commit is contained in:
Jeremy Soller 2022-12-20 08:43:26 -07:00
parent 85b4f189bd
commit 99d63063b6
13 changed files with 40 additions and 78 deletions

View file

@ -1,4 +1,3 @@
use raw_window_handle::HasRawWindowHandle;
use raw_window_handle::OrbitalWindowHandle;
use std::{
cmp,
@ -47,7 +46,7 @@ pub struct OrbitalImpl {
}
impl OrbitalImpl {
pub fn new<W: HasRawWindowHandle>(handle: OrbitalWindowHandle) -> Result<Self, SwBufError<W>> {
pub fn new(handle: OrbitalWindowHandle) -> Result<Self, SwBufError> {
Ok(Self { handle })
}
}