Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

edotorpedo

glColor3i doesn't work?

This topic is 5890 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

Hi, simple question: Why do my tris turn out black when I write glColor3i(1,1,1) ? When I change it to glColor3f(1,1,1) opengl does draw the tris correctly? Does anyone have any thoughts on this? Thanks, Edo

Share this post


Link to post
Share on other sites
Advertisement
What do you mean by "not correctly" do you get compile errors, does it crash, is it a different color than expected. Any more info would maybe get you an answer.

Share this post


Link to post
Share on other sites
Because "Current color values are stored in floating-point format, with unspecified mantissa and exponent sizes. Unsigned integer color components, when specified, are linearly mapped to floating-point values such that the largest representable value maps to 1.0 (full intensity), and zero maps to 0.0 (zero intensity). Signed integer color components, when specified, are linearly mapped to floating-point values such that the most positive representable value maps to 1.0, and the most negative representable value maps to - 1.0. Floating-point values are mapped directly."

Share this post


Link to post
Share on other sites
[Stupid erroneous statement removed, see jenova's post below for the correct answer]

Hey, LilBudyWizer posted the FM just above, isn't that nice

[edited by - Yann L on June 6, 2002 6:55:41 PM]

Share this post


Link to post
Share on other sites
actually glColor3i, has the range [min(integer), max(integer)]. on the Win32 platform that would be [-2147483648, 2147483647].

To the vast majority of mankind, nothing is more agreeable than to escape the need for mental exertion... To most people, nothing is more troublesome than the effort of thinking.

[edited by - jenova on June 6, 2002 6:50:56 PM]

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!