Jump to content

  • Log In with Google      Sign In   
  • Create Account

glColor3i


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 Lord_Vader   Members   -  Reputation: 125

Like
0Likes
Like

Posted 19 March 2007 - 11:59 AM

I am very frustrated about this. Can somebody explain to me why, when I use the function glColor3i for example glColor3i(255,0,0) it doesn't show any color except black? Am I doing something wrong? I am using MS Visual Studio 5 implementation of OpenGL. Thanls

Sponsor:

#2 Brother Bob   Moderators   -  Reputation: 8194

Like
0Likes
Like

Posted 19 March 2007 - 12:15 PM

glColor3i takes color components in the range [0, 231-1]. So glColor3i(255, 0, 0) is about the same as calling glColor3f(0.000000119, 0, 0). Pretty much black.

If you want to specify colors in the range [0, 255], use glColor3ub.

#3 Lord_Vader   Members   -  Reputation: 125

Like
0Likes
Like

Posted 19 March 2007 - 01:03 PM

Oh,I didnt know that.
Thanks





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS