View Full Version : Colours

06-01-2001, 10:13 AM
Im using glColor3d with RGB values in decimal (i.e. from 0->255). I dont get complaints, but not all my colours show up. It seems only the 0 and 255 are recognized as parameters...otherzise the colour shows up white. Whats the deal?

06-01-2001, 11:14 AM
If you're using glColor3d, you should be using values between 0 and 1. Values get clamped to this range so depending on what exactly you send, you probably won't get what you expect. If your colors are in the range 0-255 you should divide them by 255 to get the correct values for glColor3d.

06-01-2001, 12:25 PM
thx. Didnt know to divide by 255...

06-01-2001, 05:14 PM
d stands for double 1.0 - 1.0
if u wanna use values between 0-255 use ub (unsigned byte)