cepl icon indicating copy to clipboard operation
cepl copied to clipboard

Rework pixel-format

Open cbaggers opened this issue 7 years ago • 2 comments

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?

cbaggers avatar Aug 18 '18 22:08 cbaggers

read-only was trivial.. done

cbaggers avatar Aug 18 '18 22:08 cbaggers

mapping was also easy. Replaced the functions with hash-table lookups

cbaggers avatar Aug 18 '18 22:08 cbaggers