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?

BЈовић
  • 62,405
  • 41
  • 173
  • 273
seb
  • 2,136
  • 3
  • 20
  • 27
  • 1
    hm, I've been using FTGL without noticing this problem. From memory, FTGL does not change glActiveTexture, do you change its value from GL_TEXTURE0 ? Did you try to use Push/PopAttrib to try to isolate GL state for FTGL and your app's state ? – rotoglup May 05 '11 at 18:58

2 Answers2

1

Try surrounding your calls to rendering the font with

  glPushAttrib(GL_ALL_ATTRIB_BITS);

and

  glPopAttrib();

(as rotoglup suggests.)

Neil G
  • 32,138
  • 39
  • 156
  • 257
0

I've never used FTGL but you could simply be having problems with the active texture unit.

Did you try using a texture unit other than 0 for your own textures and leaving GL_TEXTURE0 to FTGL ?

The relevant documentation is here if you need it.

Nicolas Lefebvre
  • 4,247
  • 1
  • 25
  • 29