Menu

#44 ftglRenderFont with texture font doesn't unbind texture

v1.0 (example)
open
nobody
None
2
2014-03-29
2014-03-29
No

When calling ftglRenderFont using a font created using ftglCreateTextureFont in C, ftgl winds up calling glBindTexture (understandably) but apparently does not unbind the texture used (by calling glBindTexture with 0 as its second argument).

I was trying to draw a test shape for debugging and couldn't get it to show up (or when it did show up it was the wrong color) because of texture data leftover from ftglRenderFont being mapped to the shape (without calling glTexCoord2f it's easy to map a transparent pixel of your font texture across an entire shape).

It would be nice if ftgl unbound the font texture that it uses, so that subsequent drawing calls wouldn't have to do this themselves to ensure correct behavior.

Discussion


Log in to post a comment.