2

When using FTGL texture fonts, everything works perfectly until I use another texture somewhere else in my program. Then the original texture of the font seems to be lost, and as a consequence, the characters are drawn as black dots. After playing with the various parameters of glTexEnvf, I think the problem is simply that the font doesn't load its default texture back when writing.

Is there a way to access this default texture and bind it before writing?

4

2 回答 2

1

尝试围绕您的调用来渲染字体

  glPushAttrib(GL_ALL_ATTRIB_BITS);

  glPopAttrib();

(正如 rotoglup 建议的那样。)

于 2011-05-23T03:08:01.393 回答
0

我从未使用过 FTGL,但您可能只是在使用活动纹理单元时遇到问题。

您是否尝试将 0 以外的纹理单元用于您自己的纹理并将 GL_TEXTURE0 留给 FTGL ?

如果您需要,相关文档在这里。

于 2011-05-05T13:43:15.827 回答