alpha value and byte/int/float

Started by Jens v.P., April 01, 2008, 10:05:50

Previous topic - Next topic

Jens v.P.

Hi all,

there are several methods for setting the color: glColor4[b|f|d|ub].
In the OpenGL documentation, 0 is defined as transparent (zero intensity) and 1 as opaque (full intensity).
I understand that for glColor4f and glColor4d. And I assume that 0 is transparent for glColor4[b|ub], too.

But what is opaque for glColor4[b|ub]?
According to the OpenGL docs, signed integer values are mapped to ranges between -1 and 1, unsigned to 0 and 1.
How are bytes converted in glColor4ub by LWJGL? And what are the zero and full intensity values for both byte methods?

Is this table right?

methodzerofull
b-128127
ub0(byte)255=-1

Jens