I’ve got RGB values stored in a GLubyte array of size 3 and wondering how can I represent the RGB color values as a single integer, so what i want is to combine all 3 values to create an integer representation of the color, can someone explain how to do this?
Share
You can use bit shifts to produce the integer:
And to fill an array back you can use bitmasks: