Jump to content
  • Advertisement
Sign in to follow this  
cozzie

OpenGL Do you use glMaterial or glColorMaterial?

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

Hi. I was wondering would you would use to set material properties in your openGL engines. I'm now using glMaterial because I read in objects without vertexcolors. I think it's easier to not setup vertexcolors in my models, because all objects are filled in with textured materials. If I use vertex colors I have to change all objects's vertex colors when I want to change the color of the material on that object. Now I just change the material properties (glMaterial) which affects all faces of objects with that material. What would you advise?

Share this post


Link to post
Share on other sites
Advertisement
It all depends on what you need to do. Vertex coloring can sometimes be used for shading with a range of grayscale colors. It can also allow you to color different portions of a mesh so you could use the same geometry more than once, but have different looking models. (i.e. Red robot, blue robot, green robot, etc.) There's no real definitive answer.. just use what you need.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net 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!