Grokmoo / thyme

Themable Immediate Mode User Interface Toolkit in Rust
Apache License 2.0
97 stars 5 forks source link

Add possibility for implementing a renderer? #24

Open AlexEne opened 3 years ago

AlexEne commented 3 years ago

Hello,

This crate looks super cool so thanks for that. What do you think about adding the possibility for users of this crate to implement their own Renderer?

One use-case would be people that don't use glium/webgpu.rs (I use gl for my game). I woud build my own GLRenderer, but as it is now, the Renderer trait is impossible to implement as it depends on things that are private like TextureHandle, FontHandle, FontSource, etc.

Thanks, Alex

Grokmoo commented 3 years ago

Ideally I think the work creating a new Renderer would be included in crate. That way others could also use your work. If you did the bulk of the work actually doing the implementation I would be happy to handle updating docs, feature flags, etc.

However, I also don't think there is anything in particular preventing everything being used in Renderer from being made public. I guess this would mostly be a matter of adding docs. I would want to make it clear which types are only of interest for this sort of work vs which are of use for someone just using the crate.