I just use FTGL to use it in my app.
I want to use the version FTBufferFont to render font but it renders in the wrong way.
The font(texture?buffer?) is flipped in the wrong axis.
I want to use this kind of orthographic settings:
void enable2D(int w, int h)
{
winWidth = w;
winHeight = h;
glViewport(0, 0, w, h);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
//I don't even want to swap the 3rd and 4th param
//because I like to retain the top-left as the origin
glOrtho(0, w, h, 0, 0, +1);
glMatrixMode(GL_MODELVIEW);
}
I render the font like this:
//No pushing and popping of matrices
//No translation
font.Render("Hello World!", -1, position, spacing, FTGL::RenderMode::RENDER_FRONT);
On the other forums, they said, just scaled the y-axis down to -1, but it wont work in mine. Example:
font is above the screen
I can’t see relevant problem like in mine in google so I decide to ask this here again.
How can I invert texture’s y-axis without modifying its source code ? (assume its read only)