Archived

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

Shading

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