Triple Indy

04-15-2016, 12:09 PM

From www.opengl.org/wiki (https://www.opengl.org/wiki/Image_Format#Required_formats) :

The implementation is forbidden to lose information from these formats. So, while an implementation may choose to turn GL_RGB4 into GL_R3_G3_B2 (...)

...but why ?

AFAIK, GL_RGB4 means:

Red = 4 bits

Green = 4 bits

Blue = 4 bits

...and GL_R3_G3_B2 obviously means:

Red = 3 bits

Green = 3 bits

Blue = 2 bits

So why is this allowed ? How can you store 4 bits into 3 bits without loosing information ?

It seems so obvious but i cant figure it out.

The implementation is forbidden to lose information from these formats. So, while an implementation may choose to turn GL_RGB4 into GL_R3_G3_B2 (...)

...but why ?

AFAIK, GL_RGB4 means:

Red = 4 bits

Green = 4 bits

Blue = 4 bits

...and GL_R3_G3_B2 obviously means:

Red = 3 bits

Green = 3 bits

Blue = 2 bits

So why is this allowed ? How can you store 4 bits into 3 bits without loosing information ?

It seems so obvious but i cant figure it out.