cepl
cepl copied to clipboard
Rework pixel-format
Looking into read-pixels has made me pretty unsatisfied with pixel-formats as they currently stand.
Here are a few notes
read only
pixel-format's cant change so why not make them read-only
mapping
the *x->pixel-format functions could cache results as the object cant be modified anyway
gpu-structs for the types
we could have dedicated types for the packed image-formats
intermediate object
why have the object at all, if each image-type mapped to some sensible lisp type then a basic lookup is totally fine
cache sizes
element sizes are often needed, can we store these somewhere sane?
read-only was trivial.. done
mapping was also easy. Replaced the functions with hash-table lookups