Blender Git Loki

Git Commits -> Revision 100313d

Revision 100313d by Campbell Barton (master)
September 17, 2011, 10:45 (GMT)
Speedup for font drawing, every letter was character was calling:
glGetIntegerv(GL_TEXTURE_2D_BINDING_EXT, &cur_tex);

... with shadow enabled glGetFloatv(GL_CURRENT_COLOR, color) was called twice per character as well.


Now only call glGetFloatv(GL_CURRENT_COLOR, ...) once per string and only when drawing with shadow or blur, texture bind is stored in the font.

Gives 8% overall FPS speedup when displaying heavy UI in my test.

Commit Details:

Full Hash: 100313db6ecec36ad0c8e5b8a8d11bd170ff9349
SVN Revision: 40292
Parent Commit: a99f2cd
Lines Changed: +69, -41

3 Modified Paths:

/source/blender/blenfont/intern/blf.c (+7, -0) (Diff)
/source/blender/blenfont/intern/blf_glyph.c (+55, -40) (Diff)
/source/blender/blenfont/intern/blf_internal_types.h (+7, -1) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021