problems with glColor*

Is anyone else having problems with the various versions of glColor*? I can use glColor3f and glColor4f as expected, but glColor3i and glColor4i are coming up nothing but black. I wanted to use the java.awt.Color class to store color values, but calling gl.glColor3i(color.getRed(), color.getGreen(), color.getBlue()); doesn’t work, but immediately switching to gl.glColor3f(color.getRed()/255f, color.getGreen()/255f, color.getBlue()/255f); does work.

I don’t have any specific code, it’s just a general problem, defining colors using integers instead of floats fails every time.

And yes, I’m making sure that my floats are 0.0 <= f <= 1.0 and my ints are 0 <= i <= 255.

IIRC if you’re using glColorNi then you need to be in the range [0…2^16] which is probably your problem. If you use glColor3b() then it’ll take bytes in the range [0…255] though.

glColor3ub()