Flipping FTGL glyphs

Posts: 834
Joined: 2002.09
Post: #1
After finally getting FTGL to work for me, I noticed that FTGLTextureFont:s render themselves upside down in my viewport. I could probably invert them by scaling my texture matrix by 1, -1, 1, but I'd rather not mess around with the GL state in that way, that much. I suppose that it would be possible to edit the FTGL itself, but before I embark on such a mission, I thought I'd ask if anyone has worked themselves around this in a more obvious way?
Quote this message in a reply
Posts: 5,143
Joined: 2002.04
Post: #2
Which way up is your viewport? OpenGL traditionally puts the origin in the lower left; I'd assume that that's what FTGL assumes.

Why do you feel that changing the texture matrix is such a major operation? You can push and pop it just like any other matrix...
Quote this message in a reply
Posts: 1,199
Joined: 2004.10
Post: #3
Are you rendering them in an ortho2d projection transform? I've never seen this happen in my code, but then, I've only used them in 2D overlays.
Quote this message in a reply
Posts: 2
Joined: 2014.03
Post: #4
Considering your origin is top-left of the window, how did you properly flipped the font? I cannot do it by just scaling the y to -1 because its translating up above the screen by the font height. I have your old problem, can you give the solution?
Quote this message in a reply
Posts: 834
Joined: 2002.09
Post: #5
Wow, almost ten years later..!
I remember that I just bit the bullet and flipped the viewport the right way up.
Had to correct a few things in game code, but it worked out all right.

Sorry, no better idea than this; but flipping the texture matrix might be easier if you have your font code encapsulated well.
Quote this message in a reply
Posts: 116
Joined: 2002.06
Post: #6

Just looking at the original date stamp of this post, was it in relation to El Ballo?

(Retro-infused games for iPad, iPhone, iPod touch, and Mac)
Quote this message in a reply
Post Reply