Fill Canvas with Texture


I have a texture containing a canvas. On that canvas is text. How can I prevent that text from scaling up and down? For example, if my font-size is 60px I want the text to always stay at 60px. I don’t want it to be scaled at all.

Normally I might just use a 2D canvas and be done with it, but I need to use a WebGL texture so that I can take advantage of its smooth animation.


I’ve figured out how to do this. I set both the Projection and ModelView matrices to the identity. Then I used the following vertices:

var vertices = [-1, -1, 1, -1, 1, 1, -1, 1];

Now my font is not being distorted.

I’m still struggling with another issue though which I will post in a separate thread.