If I have the following texture:
black & white arrow example
How can I colorize this but not completely tint the texture so that the white in it becomes purple or red?
Just a bit of background, this is for an iOS game I am making with Cocos2d which uses OpenGL ES 2.0 under the hood. Originally, I was using 7 different colored texture files, which were identical other than their color, which was very wasteful… So I have been trying to explore ways to programmatically change the colors… My first attempt was to use Apple’s CoreImage filters prior to loading the textures into openGL, and it works— but there is a horrific performance lag when loading my textures now, so I was wondering how easy/difficult of a task this would be with openGL?
The method at line 119 is how the game library loads textures: