11#[ cfg( feature = "glow" ) ]
22use iced_glow:: window:: Compositor as GlowCompositor ;
3+ #[ cfg( feature = "glow" ) ]
4+ use iced_glutin:: Compositor as GlutinCompositor ;
35use iced_graphics:: {
46 compositor:: { self , Compositor as _, Information , SurfaceError } ,
57 Color , Error , Viewport ,
@@ -16,7 +18,7 @@ use crate::Renderer;
1618/// A window graphics backend for iced powered by `glow`.
1719pub enum Compositor < Theme > {
1820 #[ cfg( feature = "glow" ) ]
19- Glow ( GlowCompositor < Theme > ) ,
21+ Glow ( GlutinCompositor < GlowCompositor < Theme > > ) ,
2022 #[ cfg( feature = "softbuffer" ) ]
2123 softbuffer( softbufferCompositor < Theme > ) ,
2224 #[ cfg( feature = "wgpu" ) ]
@@ -25,7 +27,7 @@ pub enum Compositor<Theme> {
2527
2628pub enum Surface < Theme > {
2729 #[ cfg( feature = "glow" ) ]
28- Glow ( <GlowCompositor < Theme > as compositor:: Compositor >:: Surface ) ,
30+ Glow ( <GlutinCompositor < GlowCompositor < Theme > > as compositor:: Compositor >:: Surface ) ,
2931 #[ cfg( feature = "softbuffer" ) ]
3032 softbuffer(
3133 <softbufferCompositor < Theme > as compositor:: Compositor >:: Surface ,
@@ -40,13 +42,16 @@ impl<Theme> Compositor<Theme> {
4042 settings : crate :: Settings ,
4143 compatible_window : Option < & W > ,
4244 ) -> Result < ( Self , Renderer < Theme > ) , Error > {
43- match GlowCompositor :: new (
44- iced_glow:: Settings {
45- default_font : settings. default_font ,
46- default_text_size : settings. default_text_size ,
47- text_multithreading : settings. text_multithreading ,
48- antialiasing : settings. antialiasing ,
49- ..iced_glow:: Settings :: from_env ( )
45+ match GlutinCompositor :: new (
46+ iced_glutin:: Settings {
47+ gl_settings : iced_glow:: Settings {
48+ default_font : settings. default_font ,
49+ default_text_size : settings. default_text_size ,
50+ text_multithreading : settings. text_multithreading ,
51+ antialiasing : settings. antialiasing ,
52+ ..iced_glow:: Settings :: from_env ( )
53+ } ,
54+ try_opengles_first : false , // XXX
5055 } ,
5156 compatible_window,
5257 ) {
0 commit comments