Jump to content
  • Advertisement

Archived

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

MattCarpenter

Shading

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

Im working on a shadow engine for OpenGL, but Im a complete OGL noobie, so I was wondering if I could also set a color of a vertex (in between glBegin(...) and glEnd()) as well as set texture coords, so I can ''shade'' a vertex manually?

Share this post


Link to post
Share on other sites
Advertisement
Use glColor4f(R,G,B,A); to set the color of a particular vertex. You also have to disable Lighting (glDisable(GL_LIGHTING)) in order to get this to work. But why dont you just use the OpenGL lighting? If you wan''t more powerful shading techniques, you should learn how to use vertex programs. They can be very powerful. Cg makes it quite easy too and they will be faster than anything you could do manually.

One by one, the peguins steal my sanity.

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!