Closed MarijnS95 closed 2 months ago
From this crate's API, it looks like "multiple versioned functions of metal_layer_from_handle() for each version of raw-window-handle" is probably the only good option.
So we'd end up with metal_layer_from_raw_window_handle_05()
etc. Probably the same for ash-window
even though unfortunately that match
block is much bigger?
Supporting multiple versions on the producer end is really easy via just implementing the traits for each version of the crate (feature-gated so that you don't have to have duplicate
raw-window-handle
dependencies). However, doing this for the consumer end (here and inash-window
for example) is more problematic as we should essentially have multiple versioned functions ofmetal_layer_from_handle()
for each version ofraw-window-handle
, Alternatively we could implement a conversiontrait
for every version ofraw-window-handle
.@notgull suggestions (preferably in a separate issue/PR/discussion)?
Originally posted by @MarijnS95 in https://github.com/norse-rs/raw-window-metal/issues/10#issuecomment-1787481982