diff options
author | Mike Erwin <significant.bit@gmail.com> | 2015-12-08 09:19:08 +0300 |
---|---|---|
committer | Mike Erwin <significant.bit@gmail.com> | 2015-12-08 09:19:55 +0300 |
commit | 6006173f4adb44cefd6fb92e451aef19d69d0ea7 (patch) | |
tree | e86ed139119ff727b955fd926516fbb38a11a9f3 /source/blender/blenfont/intern/blf_glyph.c | |
parent | c013d64a0a2dd1455111d5080fd968561fdad8d0 (diff) |
OpenGL: use sized texture internal formats
Maybe this is pedantic but I read it’s best to explicitly set the
desired component size.
Also append “_ARB” to float texture formats since those need an
extension in GL 2.1.
Diffstat (limited to 'source/blender/blenfont/intern/blf_glyph.c')
-rw-r--r-- | source/blender/blenfont/intern/blf_glyph.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenfont/intern/blf_glyph.c b/source/blender/blenfont/intern/blf_glyph.c index 215d2484c18..4399cbf97c6 100644 --- a/source/blender/blenfont/intern/blf_glyph.c +++ b/source/blender/blenfont/intern/blf_glyph.c @@ -175,7 +175,7 @@ static void blf_glyph_cache_texture(FontBLF *font, GlyphCacheBLF *gc) glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - glTexImage2D(GL_TEXTURE_2D, 0, GL_ALPHA, gc->p2_width, gc->p2_height, 0, GL_ALPHA, GL_UNSIGNED_BYTE, NULL); + glTexImage2D(GL_TEXTURE_2D, 0, GL_ALPHA8, gc->p2_width, gc->p2_height, 0, GL_ALPHA, GL_UNSIGNED_BYTE, NULL); } GlyphBLF *blf_glyph_search(GlyphCacheBLF *gc, unsigned int c) |