Jump to content
  • Advertisement


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


Color shading for quadrics

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

Hello All, I am new to Opengl. If i specify different color for each polygon vertex and my shade model is GL_SMOOTH i would be getting a smooth color transformation effect. To be more precise, glBegin(GL_POLYGON); glColor3f(0.0f,0.0f,0.0f); glVertex2f(-150.0f,-150.0f); glColor3f(0.0f,0.0f,0.0f); glVertex2f(150.0f,-150.0f); glColor3f(0.0f,0.0f,1.0f); glVertex2f(150.0f,150.0f); glColor3f(0.0f,0.0f,1.0f); glVertex2f(-150.0f,150.0f); glEnd(); I would get a Polygon of the above said area starting from the bottom with the color Black and smoothly progressing towards Blue color when it reaches the top. Can i get this effect for a quadric(disk,cylinder...)object if so how can i do that ? Without lighting ? Please help me to get this. Thanks in Advance ! Edited by - urram on September 10, 2001 9:25:09 AM Edited by - urram on September 10, 2001 9:36:10 AM

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!