Opengl, How To Set A Monochrome Texture To A Colored Shape?
I'm developing on Android with OpenGL ES, I draw some cubes and I change their colors with glColor4f. Now, what I want is to give a more realistic effect on the cubes, so I create
Solution 1:
When you set the texture environment mode, use GL_MODULATE instead of GL_REPLACE. MODULATE will multiply the interpolated color with the sampled texture color, where REPLACE discards the interpolated color entirely, and replaces it with the sampled texture color.
Post a Comment for "Opengl, How To Set A Monochrome Texture To A Colored Shape?"