Advertisement Jump to content


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


Everything just white when lighting is disabled??

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

How come? I want to render my scene with "unmodified" colors (I want all the pixels of an object to appear in color (255,0,0) when I set that color for instance). I disabled dithering and put the shading model to GL_FLAT. Something is still missing but I can''t find out! By the way I don''t do any texturing

Share this post

Link to post
Share on other sites
That''s it! Thanks

I was setting colors with glMaterial...
I think I still didn''t understand the big difference between glMaterial and glColor. Which one is usually used when doing normal rendering (normal==with light influencing the appearance)? What about when I use textures in future, will I have to use glColor or glMaterial?
Can both commands be combined?

Share this post

Link to post
Share on other sites
Another quick question:

If I have a 16 bit color window and I am using glColor3ub(r,g,b), how are the single bytes (r,g or b) limited.

Obviously 16 bit is 2 bytes. But we have 3 bytes to specify the color and 16 bit/3 doesn't give a round number...
So if I set the color to glColor3ub(245,3,25) the color I will read in the pixels won't let me find back the 3 initial values (245,3,25).
What is the mapping?

Wait, I think I've found out: since there is always an alpha-value, we have 16 bit/4 = 4.
So this means there can't be more than 16 different values for each r,g,b or alpha-value, right?
So glColor3ub(2,16,255) would give me exactly the same color as glColor3ub(3,18,252), right?

[edited by - Floating on February 3, 2003 9:02:46 PM]

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!