Jump to content
  • Advertisement
Sign in to follow this  
Lord_Vader

OpenGL glColor3i

This topic is 4114 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
Advertisement
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!