Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDalai Felinto <dfelinto@gmail.com>2017-04-04 19:38:26 +0300
committerDalai Felinto <dfelinto@gmail.com>2017-04-04 19:43:01 +0300
commitf10219a9772c948ecddfa486ba591952d3caafdc (patch)
tree93b9961ca0489bc1ee9c6a7813fd373a77c8d367 /source/blender/windowmanager/intern/wm_gesture.c
parentfa317eb69c6e7f83cac329f209d7a76916754e76 (diff)
Immediate Mode: handle other cases of glPop/glPushClientAttrib
Those cases were not using ClientAttrib but they should :) Rather use a OpenGL3.3 alternative anyways.
Diffstat (limited to 'source/blender/windowmanager/intern/wm_gesture.c')
-rw-r--r--source/blender/windowmanager/intern/wm_gesture.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/windowmanager/intern/wm_gesture.c b/source/blender/windowmanager/intern/wm_gesture.c
index 30867a2bba4..d49c83fa729 100644
--- a/source/blender/windowmanager/intern/wm_gesture.c
+++ b/source/blender/windowmanager/intern/wm_gesture.c
@@ -369,6 +369,9 @@ static void draw_filled_lasso(wmWindow *win, wmGesture *gt)
glEnable(GL_BLEND);
glBlendFunc(GL_ONE, GL_ONE);
+ GLint unpack_alignment;
+ glGetIntegerv(GL_UNPACK_ALIGNMENT, &unpack_alignment);
+
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
GPUShader *shader = immDrawPixelsTexSetup(GPU_SHADER_2D_IMAGE_SHUFFLE_COLOR);
@@ -379,7 +382,7 @@ static void draw_filled_lasso(wmWindow *win, wmGesture *gt)
GPU_shader_unbind();
- glPixelStorei(GL_UNPACK_ALIGNMENT, 4);
+ glPixelStorei(GL_UNPACK_ALIGNMENT, unpack_alignment);
MEM_freeN(pixel_buf);