1
1
#[ cfg( feature = "glow" ) ]
2
2
use iced_glow:: window:: Compositor as GlowCompositor ;
3
+ #[ cfg( feature = "glow" ) ]
4
+ use iced_glutin:: Compositor as GlutinCompositor ;
3
5
use iced_graphics:: {
4
6
compositor:: { self , Compositor as _, Information , SurfaceError } ,
5
7
Color , Error , Viewport ,
@@ -16,7 +18,7 @@ use crate::Renderer;
16
18
/// A window graphics backend for iced powered by `glow`.
17
19
pub enum Compositor < Theme > {
18
20
#[ cfg( feature = "glow" ) ]
19
- Glow ( GlowCompositor < Theme > ) ,
21
+ Glow ( GlutinCompositor < GlowCompositor < Theme > > ) ,
20
22
#[ cfg( feature = "softbuffer" ) ]
21
23
softbuffer( softbufferCompositor < Theme > ) ,
22
24
#[ cfg( feature = "wgpu" ) ]
@@ -25,7 +27,7 @@ pub enum Compositor<Theme> {
25
27
26
28
pub enum Surface < Theme > {
27
29
#[ cfg( feature = "glow" ) ]
28
- Glow ( <GlowCompositor < Theme > as compositor:: Compositor >:: Surface ) ,
30
+ Glow ( <GlutinCompositor < GlowCompositor < Theme > > as compositor:: Compositor >:: Surface ) ,
29
31
#[ cfg( feature = "softbuffer" ) ]
30
32
softbuffer(
31
33
<softbufferCompositor < Theme > as compositor:: Compositor >:: Surface ,
@@ -40,13 +42,16 @@ impl<Theme> Compositor<Theme> {
40
42
settings : crate :: Settings ,
41
43
compatible_window : Option < & W > ,
42
44
) -> 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
50
55
} ,
51
56
compatible_window,
52
57
) {
0 commit comments