diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2015-11-28 03:20:28 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2015-12-06 21:35:15 +0300 |
commit | cf921934b1a6a30461779e26d67d02d0b66bdafc (patch) | |
tree | ea6e1a6618628f11a4114ecb47cfd94acc005939 /source/blender/blenfont | |
parent | 147f7a1e860587a928f465b0b4d0ecf816c997be (diff) |
OpenGL: use simple shader for texture drawing in a few places.
Differential Revision: https://developer.blender.org/D1645
Diffstat (limited to 'source/blender/blenfont')
-rw-r--r-- | source/blender/blenfont/intern/blf.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/blenfont/intern/blf.c b/source/blender/blenfont/intern/blf.c index 3369e1c08b6..8b654d25bcf 100644 --- a/source/blender/blenfont/intern/blf.c +++ b/source/blender/blenfont/intern/blf.c @@ -55,6 +55,8 @@ #include "IMB_colormanagement.h" +#include "GPU_simple_shader.h" + #include "blf_internal_types.h" #include "blf_internal.h" @@ -494,9 +496,10 @@ static void blf_draw_gl__start(FontBLF *font, GLint *mode) */ glEnable(GL_BLEND); - glEnable(GL_TEXTURE_2D); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + GPU_simple_shader_bind(GPU_SHADER_TEXTURE_2D | GPU_SHADER_USE_COLOR); + /* Save the current matrix mode. */ glGetIntegerv(GL_MATRIX_MODE, mode); @@ -536,8 +539,8 @@ static void blf_draw_gl__end(GLint mode) if (mode != GL_MODELVIEW) glMatrixMode(mode); + GPU_simple_shader_bind(GPU_SHADER_USE_COLOR); glDisable(GL_BLEND); - glDisable(GL_TEXTURE_2D); } void BLF_draw_ex( |