Satchmo Brown
Satchmo Brown

Reputation: 1437

Using vertex colors and textures in OpenGL?

I am familiar with texture usage in OpenGL. I am also familiar with the coloring and interpolation of colors between vertices. Can the two be used in conjunction with one another? Does doing so tint the texture with the color supplied at each vertex? I am rendering an older game format which supplies both so I am trying to figure out if they both work in conjunction to create variations for the textures.

Cheers.

Upvotes: 1

Views: 2409

Answers (1)

Jarryd
Jarryd

Reputation: 1322

Yes you can do that. If you set the colour on a vertex to anything other than white, the texture that is applied will be filtered by the colour given. If different vertices on the same polygon have different colours, and there are textures, the colours will be interpolated exactly the same as for no textures.

Upvotes: 4

Related Questions