Colours

Hey,
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?

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.

thx. Didnt know to divide by 255…

d stands for double 1.0 - 1.0
if u wanna use values between 0-255 use ub (unsigned byte)