Closed ratmice closed 6 months ago
This has analogs to what had to be done in the writer API to unify the older write_face_u32
/ write_face_f32
and write_face_u8
functions into a single interface when f16 support was added.
849375fab058d1584ece82856fe1a5f791c74ae2 handled it by introducing a trait. That commit eliminated the various type-specific functions and then that trait was leveraged in 7b7861be62cbc96e7157f3682ade638962512a50 when adding f16 support.
That approach might work here too.
Before jumping in to trying to write a patch for writing of metadata, I wanted to make an issue for discussing the api design surrounding it. Because the metadata functions are all overloaded, it seems there are a few paths that could be taken.
from just having a bunch of functions
Alternately we could consider including a type and avoid overloading the write function, then marshall everything through a
write_meta
function which behaves like the version ofwriteMeta
that takes aPtexMetaData
.I haven't thought about it too terribly much, but those seemed to be the major forks in the path regarding how we could go forward.