diff options
author | Campbell Barton <ideasman42@gmail.com> | 2016-06-07 21:03:25 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2016-06-07 21:13:21 +0300 |
commit | f3d33a1a0f1dd4092d35760027f495bc21d1e4be (patch) | |
tree | 404db0cfdc9a1ac70622567077014cb299a9d916 /source/blender/windowmanager | |
parent | cf8a0d08b034dd59624a8657ab79f51b64708ab1 (diff) |
GPU: Fix for glDrawPixels drawing w/ glsl shader
The basic shader needs to be temporarily disabled in this case.
Add macros for temp store/restoring the state.
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r-- | source/blender/windowmanager/intern/wm_gesture.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/windowmanager/intern/wm_gesture.c b/source/blender/windowmanager/intern/wm_gesture.c index 26d1d4c3266..db933ad2d76 100644 --- a/source/blender/windowmanager/intern/wm_gesture.c +++ b/source/blender/windowmanager/intern/wm_gesture.c @@ -281,6 +281,9 @@ static void draw_filled_lasso(wmWindow *win, wmGesture *gt) (const int (*)[2])moves, tot, draw_filled_lasso_px_cb, &lasso_fill_data); + int bound_options; + GPU_BASIC_SHADER_DISABLE_AND_STORE(bound_options); + glEnable(GL_BLEND); // glColor4f(1.0, 1.0, 1.0, 0.05); @@ -288,6 +291,8 @@ static void draw_filled_lasso(wmWindow *win, wmGesture *gt) glDrawPixels(w, h, GL_RGBA, GL_UNSIGNED_BYTE, pixel_buf); + GPU_BASIC_SHADER_ENABLE_AND_RESTORE(bound_options); + glDisable(GL_BLEND); MEM_freeN(pixel_buf); } |