Reputation: 19729
In OpenGL I simply call glColor3f and then draw the texture to get it coloured, but how do I do this in SDL? I have looked through the docs and cannot see anyway to do this.
I am trying to make this work under SDL too because I want an SDL-only mode for my game, incase the person playing doesn't have a very good graphics card.
Upvotes: 0
Views: 721
Reputation: 1094
There isn't a built-in function to do it, you'll have to it manually in software. A decently quick and straight forward way to do it would be:
dst_color = src_color * blend_color / 255;
This may be quite slow if you do it a lot, though.
Upvotes: 1