PistonDevelopers / conrod

An easy-to-use, 2D GUI library written entirely in Rust.
Other
3.35k stars 296 forks source link

Seems that gfx-rs backend is (slightly) broken #1109

Closed OtaK closed 6 years ago

OtaK commented 6 years ago

Hey, I'm currently exploring other backends than glium, and I've tried the gfx-rs example, and I stumbled upon this error:

capture d ecran 2017-12-14 a 15 29 46

Which I solved by just adding the required lifetime annotation in src/backend/gfx.rs

Anything I might have done wrong? Any way to get a quick patch?

Thanks

mitchmindtree commented 6 years ago

Ahh thanks for the issue @OtaK, definitely a bug!

Perhaps for now we can just give it a 'static lifetime to get it working? I just realised that the gfx-rs feature is missing from the travis' tests - no wonder I missed it!

OtaK commented 6 years ago

I just put a GlyphCache<'a> and added 'a as a lifetime on the holding struct and it worked, so it seems it would just work with any explicit lifetime marker.

OtaK commented 6 years ago

Submitted my fix, feel free to review it!

lolgesten commented 6 years ago

@mitchmindtree for conrod, is gfx-rs a lesser tested variant than glium? Since glium seem not developed anymore, I wondered whether to use glium or gfx-rs, but then I get worried to use a variant that less people use.

mitchmindtree commented 6 years ago

@lolgesten each of the backends tend to be maintained moreso by those that use them. I happen to use the glium backend most often as I find it easiest to use for my own projects, so I tend to invest more time into it. I'm generally happy to review and advise updates to the gfx-rs backend and will likely get around to adding features to it that are desired enough. FWIW there are still many users of glium as although the original author is not happy with some parts of the design, it is still perhaps the most accessible OpenGL-specific crate out there. It is mostly maintained by community contributions these days.

This issue is closed via #1110.