Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13

Thread: Write text on texture

  1. #11

    Re: Write text on texture

    Ok, I made some tests, yes with Outline font it is possible to rotate text, the problem is that with this kind of font I can't work in 2d space, or I'm not able!
    Seems that when I use the glOrtho function to create the 2d transformation, the text becomes very very small!
    If you look in this example, when you press the Ortho button you see that the text (or what I think it is) very very small in the bottom left of the window!
    I need to work using pixel coordinate and not spacial one!

    http://www.abulafia.it/temp/OGL_SimpleNF.zip

    Thanks
    Lorenzo

  2. #12

    Re: Write text on texture

    You didn't read all of my last post. I used glScale(20,20,20) to make it normal size. The font is 1 pixel wide without scaling, if you scale by 20 it should be about same as size 20 font. Notice that glTranslate call after scaling will be multiplied aswell. (Use glPushmatrix and glPopmatrix wisely).

    Actually glScale(20,20,1) would maybe work better, would keep the text flat so ortho mode's Z-buffer won't be reached too fast.

  3. #13

    Re: Write text on texture

    Sorry, I had not seen the reference to glScale function and I had focused on the example provided!
    Thanks now it is clear and it works fine!

Page 2 of 2 FirstFirst 12

Bookmarks

Posting Permissions

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