mosra/magnum — pull request #34 by miguelishawt (2013-12-14 09:45:41+00:00)
Title: Added colour uniform to flat shader (even when texturing is enabled)

This allows blending to be done (with the texture and colour).

It is quite useful as with this you can change the transparency of an object quite simply*. Also, this allows re-colouring of textures to be done. e.g. if you made a coin image for your game, and wish to have different types of coins without having to re-create assets, you could just re-colour them.

*it might be wise to actually have this as a separate uniform, with the color attribute only having RGB values.
---

Basically a duplicate of #33, except I:

- Added default colour to be white (with OpenGL ES it calls `setColor`, and on desktop it is set in the shader)
- Updated the fork to be of the same commit you have (although I basically re-made a fork instead of updating it, oopsies, my bad there)