Jump to content

View more

Image of the Day

The night is still, but the invasion brings chaos. #screenshotsaturday #hanako #indiegame #gameart #ue4 #samurai https://t.co/cgILXuokoS
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

glColor3i

4: Adsense

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   

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

#2 Brother Bob   Moderators   

10278
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   

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.