Closed dusk125 closed 2 months ago
@dusk125
Surely there was a reason the original implementation converted them to floats, wouldn't logic like this cause unattended effects?
https://github.com/gopxl/pixel/blob/12fc9f5b840d7216d6714a71203b4a4e94d4d25c/color.go#L59-L66
So from my investigation, it looks like glhf (and glfw) expect colors to be floats between 0 and 1. There will, therefore, still need to be conversions from the uint8's to floats. So right now, this is a further investigation to see if the usage of float colors can be minimized in Pixel.
It looks like most of the time pixel.RGBA is used, it's converted back to color.RGBA anyway... and it uses 8x as much memory: 4 float64 vs 4 uint8.
and/or type alias pixel.RGBA to color.RGBA if we need/want some of the methods for pixel.RGBA