我只是使用FTGL在我的应用程序中使用它。我想使用该版本FTBufferFont
来呈现字体,但它以错误的方式呈现。字体(纹理?缓冲区?)在错误的轴上翻转。
我想使用这种正交设置:
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);
}
我希望窗口原点是top-left
我这样渲染字体:
//No pushing and popping of matrices
//No translation
font.Render("Hello World!", -1, position, spacing, FTGL::RenderMode::RENDER_FRONT);
他们说,在其他论坛上,只是将其缩小到-1,但它不适用于我的
我在谷歌中看不到我的相关问题,所以我决定再次在这里问这个问题。
更新:
我怎样才能以正确的方式翻转它的轴。我可以想到编辑源代码并翻转纹理坐标,但这并不好。
我真的需要一个快速修复..