Results 1 to 2 of 2

Thread: Fill Canvas with Texture

  1. #1
    Junior Member
    Join Date
    Sep 2011
    Posts
    4

    Fill Canvas with Texture

    Hi,

    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.

    Thx.

  2. #2
    Junior Member
    Join Date
    Sep 2011
    Posts
    4

    Re: Fill Canvas with Texture

    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:

    Code :
    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.

Similar Threads

  1. Fill Effect
    By klm_ in forum OpenGL ES general technical discussions
    Replies: 3
    Last Post: 03-07-2012, 01:49 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •