Skip to content

Commit 7a99f57

Browse files
committed
Another high level rework.
Signed-off-by: Hal Gentz <zegentzy@protonmail.com>
1 parent c898846 commit 7a99f57

File tree

3 files changed

+218
-229
lines changed

3 files changed

+218
-229
lines changed

glutin/src/context.rs

+5-13
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ impl Context {
4545
}
4646

4747
#[inline]
48-
pub fn get_pixel_format(&self) -> PixelFormat {
49-
self.context.get_pixel_format()
48+
pub fn get_surface_config(&self) -> SurfaceConfig {
49+
self.context.get_surface_config()
5050
}
5151

5252
#[inline]
@@ -66,24 +66,16 @@ impl Context {
6666
}
6767
}
6868

69-
bitflags! {
70-
#[derive(Default)]
71-
pub struct ContextSupports: u8 {
72-
const PBUFFERS = 1 << 0;
73-
const WINDOW_SURFACES = 1 << 1;
74-
const SURFACELESS = 1 << 2;
75-
}
76-
}
77-
7869
impl<'a> ContextBuilder<'a> {
7970
#[inline]
8071
pub fn build<TE>(
8172
self,
8273
el: &EventLoopWindowTarget<TE>,
83-
ctx_supports: ContextSupports,
74+
supports_surfaceless: bool,
75+
surface_config: &SurfaceConfig,
8476
) -> Result<Context, CreationError> {
8577
let cb = self.map_sharing(|ctx| &ctx.context);
86-
platform_impl::Context::new(el, cb, ctx_supports)
78+
platform_impl::Context::new(el, cb, supports_surfaceless, surface_config)
8779
.map(|context| Context { context })
8880
}
8981
}

0 commit comments

Comments
 (0)