[Bf-blender-cvs] [3481f6eaf29] master: Cleanup: GPU: Remove GL_DITHER usage

Clément Foucault noreply at git.blender.org
Thu Jul 16 17:17:58 CEST 2020


Commit: 3481f6eaf290b45025f66e5205530649502f351f
Author: Clément Foucault
Date:   Thu Jul 16 03:12:21 2020 +0200
Branches: master
https://developer.blender.org/rB3481f6eaf290b45025f66e5205530649502f351f

Cleanup: GPU: Remove GL_DITHER usage

===================================================================

M	source/blender/gpu/intern/gpu_state.c

===================================================================

diff --git a/source/blender/gpu/intern/gpu_state.c b/source/blender/gpu/intern/gpu_state.c
index 30b258a73d1..8a9fbac08a3 100644
--- a/source/blender/gpu/intern/gpu_state.c
+++ b/source/blender/gpu/intern/gpu_state.c
@@ -186,12 +186,10 @@ void GPU_logic_op_invert_set(bool enable)
   if (enable) {
     glLogicOp(GL_INVERT);
     glEnable(GL_COLOR_LOGIC_OP);
-    glDisable(GL_DITHER);
   }
   else {
     glLogicOp(GL_COPY);
     glDisable(GL_COLOR_LOGIC_OP);
-    glEnable(GL_DITHER);
   }
 }
 
@@ -207,7 +205,6 @@ typedef struct {
   uint is_blend : 1;
   uint is_cull_face : 1;
   uint is_depth_test : 1;
-  uint is_dither : 1;
   /* uint is_lighting : 1; */ /* UNUSED */
   uint is_line_smooth : 1;
   uint is_color_logic_op : 1;
@@ -275,7 +272,6 @@ void gpuPushAttr(eGPUAttrMask mask)
 
     Attr.is_cull_face = glIsEnabled(GL_CULL_FACE);
     Attr.is_depth_test = glIsEnabled(GL_DEPTH_TEST);
-    Attr.is_dither = glIsEnabled(GL_DITHER);
     Attr.is_line_smooth = glIsEnabled(GL_LINE_SMOOTH);
     Attr.is_color_logic_op = glIsEnabled(GL_COLOR_LOGIC_OP);
     Attr.is_multisample = glIsEnabled(GL_MULTISAMPLE);
@@ -339,7 +335,6 @@ void gpuPopAttr(void)
 
     restore_mask(GL_CULL_FACE, Attr.is_cull_face);
     restore_mask(GL_DEPTH_TEST, Attr.is_depth_test);
-    restore_mask(GL_DITHER, Attr.is_dither);
     restore_mask(GL_LINE_SMOOTH, Attr.is_line_smooth);
     restore_mask(GL_COLOR_LOGIC_OP, Attr.is_color_logic_op);
     restore_mask(GL_MULTISAMPLE, Attr.is_multisample);



More information about the Bf-blender-cvs mailing list