What would be the easiest way of overlaying texture color. What i want to achieve is to entirely overwrite texture to 1 desired color, but have option to manipulate color's alpha in order to revert back to regular image.
Example of what I am trying to achieve.
First image would be regular texture, then 2nd image would be 100% alpha on red color, 3rd image would be 50% alpha on red color.
(http://i.imgur.com/VFA8u.png)
So far i was only successful in tinting the texture but not doing overlay. Help would be highly appreciated.
In case anyone in future wondered how to render it.
Color color = Color.RED;
glEnable(GL_COLOR_SUM);
glSecondaryColor3f(color.getRed(), color.getGreen(), color.getBlue());
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
// render texture
glDisable(GL_COLOR_SUM);
Thanks for davedes for helping out ;)