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/editors/interface/interface_icons.c | |
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/editors/interface/interface_icons.c')
-rw-r--r-- | source/blender/editors/interface/interface_icons.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c index 843b0d5f2dc..e0128660e77 100644 --- a/source/blender/editors/interface/interface_icons.c +++ b/source/blender/editors/interface/interface_icons.c @@ -34,6 +34,7 @@ #include "MEM_guardedalloc.h" #include "GPU_extensions.h" +#include "GPU_simple_shader.h" #include "BLI_blenlib.h" #include "BLI_utildefines.h" @@ -1122,7 +1123,7 @@ static void icon_draw_texture( y1 = iy * icongltex.invh; y2 = (iy + ih) * icongltex.invh; - glEnable(GL_TEXTURE_2D); + GPU_simple_shader_bind(GPU_SHADER_TEXTURE_2D | GPU_SHADER_USE_COLOR); glBindTexture(GL_TEXTURE_2D, icongltex.id); /* sharper downscaling, has no effect when scale matches with a mip level */ @@ -1145,7 +1146,7 @@ static void icon_draw_texture( glTexEnvf(GL_TEXTURE_FILTER_CONTROL, GL_TEXTURE_LOD_BIAS, 0.0f); glBindTexture(GL_TEXTURE_2D, 0); - glDisable(GL_TEXTURE_2D); + GPU_simple_shader_bind(GPU_SHADER_USE_COLOR); } /* Drawing size for preview images */ |