0

Given that I have a texture file generated from a font bitmap builder like this:

enter image description here

Now I load it into my program. Then, I want to write my text with different colors rather than black such as blue, pink, ... from that original texture file.

What trick or algorithm should I use?

Any one can help me, please

Thank you very much.

4

1 回答 1

1

如果您可以访问具有透明度的白色版本,则可以使用硬件顶点混合来获得所需的任何颜色,但正如我所说,文本必须是白色的。在软件循环中执行它是可能的,但只能使用蛮力。即使您使用库,它也只会扫描每个像素,转换它,然后重新编写它......这很慢。所以使用硬件顶点着色。

于 2012-04-22T05:17:16.447 回答