In OpenGL I simply call glColor3f and then draw the texture to get it coloured, but how do I do th开发者_Go百科is 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.
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.
精彩评论