kvark / blade

Sharp and simple graphics library
MIT License
543 stars 37 forks source link

Dynamic backends (or multiple static backends) #130

Open lukaslihotzki opened 5 months ago

lukaslihotzki commented 5 months ago

Do you have any idea how to make the backends (specifically, GLES or Vulkan) selectable at runtime? For exmaple, by making some object-safe traits? Alternatively, it would help if multiple backends can be activated at the same time (for example, with cargo features, preferably exposed as (non-object-safe) traits too). Then, abstracting over multiple backends could be done by the application.

kvark commented 5 months ago

Yes, the latter, I think, is the way to explore. Make it possible to build multiple backends even if the "root" exported types are from one of them. Would require a few fixes in the backends themselves, since sometimes they use types as crate::Type, but possible.