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:
authorClément Foucault <foucault.clem@gmail.com>2020-07-17 16:58:33 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-07-18 04:43:52 +0300
commit2d9eee15c58ba1d3e2bd05a17ca09d74421c47ea (patch)
tree5178eda0d4dfef2081cad696d37052f3a797a39b /source/blender/windowmanager/intern/wm_gesture.c
parent0ef57d3fc079795f77ab7f13bca842ab172af08f (diff)
Cleanup: GPU: Set default GL_UNPACK_ALIGNMENT to 1
Ogl default is 4 but for almost all cases, blender use tightly packed format. This avoid confusion and state change for the common case. The only case that __might__ need alignement is DDS loader (untested) so leaving this as it is.
Diffstat (limited to 'source/blender/windowmanager/intern/wm_gesture.c')
-rw-r--r--source/blender/windowmanager/intern/wm_gesture.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/source/blender/windowmanager/intern/wm_gesture.c b/source/blender/windowmanager/intern/wm_gesture.c
index 52c934424e4..e7cb1c00605 100644
--- a/source/blender/windowmanager/intern/wm_gesture.c
+++ b/source/blender/windowmanager/intern/wm_gesture.c
@@ -357,11 +357,6 @@ static void draw_filled_lasso(wmGesture *gt)
GPU_blend(true);
GPU_blend_set_func(GPU_ONE, GPU_ONE);
- GLint unpack_alignment;
- glGetIntegerv(GL_UNPACK_ALIGNMENT, &unpack_alignment);
-
- glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
-
IMMDrawPixelsTexState state = immDrawPixelsTexSetup(GPU_SHADER_2D_IMAGE_SHUFFLE_COLOR);
GPU_shader_bind(state.shader);
GPU_shader_uniform_vector(
@@ -382,8 +377,6 @@ static void draw_filled_lasso(wmGesture *gt)
GPU_shader_unbind();
- glPixelStorei(GL_UNPACK_ALIGNMENT, unpack_alignment);
-
MEM_freeN(pixel_buf);
GPU_blend(false);