Jump to content
  • Advertisement

Archived

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

cmr8301

Newbie: Need help with color

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

Hey guys, I''m an OpenGL Newbie who''s done some of NeHe''s Tut''s. Anyhow, I''m making a little world to walk around in that combines the tutorials on the 3D world, outline fonts, and some other basic effects. Somehow, I''ve made it so that I am unable to change the color of a simple polygon with a glColor3f statement, unless I''ve texture mapped something onto it. It''s pretty weird. I can just texture-map a white bmp onto whatever I want to draw, but if anyone thinks they may know what the problem is, all suggestions are welcome. Thanks, Chris

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
Did you enable GL_COLOR_MATERIAL?

Share this post


Link to post
Share on other sites
I added the first line...

glColorMaterial(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE);
glEnable(GL_COLOR_MATERIAL);

...and got it to work. It didn't work for a bit though, but it does now, so it's cool. Thanks.

It turns out that that line didn't make the difference, it was something specific to my system (possibly the video card). Doesn't matter though, I've got a machine that it'll run on.

[edited by - cmr8301 on June 17, 2003 4:39:45 PM]

[edited by - cmr8301 on June 17, 2003 4:45:14 PM]

[edited by - cmr8301 on June 18, 2003 2:54:39 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!