From f3d33a1a0f1dd4092d35760027f495bc21d1e4be Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 8 Jun 2016 04:03:25 +1000 Subject: 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. --- source/blender/windowmanager/intern/wm_gesture.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source/blender/windowmanager/intern/wm_gesture.c') 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); } -- cgit v1.2.3