glColor3i doesn't work?

Started by
4 comments, last by edotorpedo 21 years, 10 months ago
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
Edo
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.
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."
Keys to success: Ability, ambition and opportunity.
[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]
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]
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.
Damnit, you''re right. I''m getting tired... Still holds for the RTFM though

This topic is closed to new replies.

Advertisement