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/sculpt_paint | |
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/sculpt_paint')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_cursor.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_cursor.c b/source/blender/editors/sculpt_paint/paint_cursor.c index 9f5602efad0..079d0888207 100644 --- a/source/blender/editors/sculpt_paint/paint_cursor.c +++ b/source/blender/editors/sculpt_paint/paint_cursor.c @@ -59,6 +59,8 @@ #include "ED_view3d.h" +#include "GPU_simple_shader.h" + #include "UI_resources.h" #include "paint_intern.h" @@ -334,7 +336,7 @@ static int load_tex(Brush *br, ViewContext *vc, float zoom, bool col, bool prima target->old_col = col; } - glEnable(GL_TEXTURE_2D); + GPU_simple_shader_bind(GPU_SHADER_TEXTURE_2D | GPU_SHADER_USE_COLOR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); @@ -457,7 +459,7 @@ static int load_tex_cursor(Brush *br, ViewContext *vc, float zoom) MEM_freeN(buffer); } - glEnable(GL_TEXTURE_2D); + GPU_simple_shader_bind(GPU_SHADER_TEXTURE_2D | GPU_SHADER_USE_COLOR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); @@ -793,6 +795,7 @@ static void paint_draw_alpha_overlay(UnifiedPaintSettings *ups, Brush *brush, } glPopAttrib(); + GPU_simple_shader_bind(GPU_SHADER_USE_COLOR); } |