diff options
author | Diego Borghetti <bdiego@gmail.com> | 2012-01-06 20:40:57 +0400 |
---|---|---|
committer | Diego Borghetti <bdiego@gmail.com> | 2012-01-06 20:40:57 +0400 |
commit | 5ba14fd210355e0bbff7746cdc58ec96b7a489de (patch) | |
tree | 8767fab3342ea8a6150231cfb2500a1a64dbf579 /source/blender/blenfont/intern/blf_glyph.c | |
parent | 7ff5a17ff2959fcd1a13b245596c52e057e57e39 (diff) |
Move glTexEnvi to draw__start/draw__end.
As Campbell point, this is to avoid call glGet/glTexEnvi
on each character.
Diffstat (limited to 'source/blender/blenfont/intern/blf_glyph.c')
-rw-r--r-- | source/blender/blenfont/intern/blf_glyph.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/source/blender/blenfont/intern/blf_glyph.c b/source/blender/blenfont/intern/blf_glyph.c index f8c589a7051..f0cfcdc97b9 100644 --- a/source/blender/blenfont/intern/blf_glyph.c +++ b/source/blender/blenfont/intern/blf_glyph.c @@ -368,7 +368,6 @@ int blf_glyph_render(FontBLF *font, GlyphBLF *g, float x, float y) float dx, dx1; float y1, y2; float xo, yo; - GLint param; if ((!g->width) || (!g->height)) return 1; @@ -450,11 +449,6 @@ int blf_glyph_render(FontBLF *font, GlyphBLF *g, float x, float y) glBindTexture(GL_TEXTURE_2D, (font->tex_bind_state= g->tex)); } - /* Save the current parameter to restore it later. */ - glGetTexEnviv(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, ¶m); - if (param != GL_MODULATE) - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); - if (font->flags & BLF_SHADOW) { switch(font->shadow) { @@ -493,9 +487,5 @@ int blf_glyph_render(FontBLF *font, GlyphBLF *g, float x, float y) break; } - /* and restore the original value. */ - if (param != GL_MODULATE) - glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, param); - return 1; } |