DRW: Deprecate / Remove DRW_STATE_STIPPLE_*
authorClément Foucault <foucault.clem@gmail.com>
Mon, 10 Dec 2018 22:17:07 +0000 (23:17 +0100)
committerClément Foucault <foucault.clem@gmail.com>
Mon, 10 Dec 2018 22:17:20 +0000 (23:17 +0100)
This was unused and used the old drawing paradygm

source/blender/draw/intern/DRW_render.h
source/blender/draw/intern/draw_common.c
source/blender/draw/intern/draw_manager_exec.c

index d3d4a35cf18e0713cd1fb0a7f48ff994e7921f0e..519c907a6a450dd5ebbb7907ece7afefee71a1e1 100644 (file)
@@ -283,9 +283,9 @@ typedef enum {
        DRW_STATE_CULL_FRONT    = (1 << 9),
        DRW_STATE_WIRE          = (1 << 10),
        DRW_STATE_POINT         = (1 << 11),
-       DRW_STATE_STIPPLE_2     = (1 << 12),
-       DRW_STATE_STIPPLE_3     = (1 << 13),
-       DRW_STATE_STIPPLE_4     = (1 << 14),
+       /* DRW_STATE_STIPPLE_2     = (1 << 12), */ /* Not used */
+       /* DRW_STATE_STIPPLE_3     = (1 << 13), */ /* Not used */
+       /* DRW_STATE_STIPPLE_4     = (1 << 14), */ /* Not used */
        DRW_STATE_BLEND         = (1 << 15),
        DRW_STATE_ADDITIVE      = (1 << 16),
        DRW_STATE_MULTIPLY      = (1 << 17),
index 09134f139a7dd12b15353e97a1260d5ae6049431..e3fde3d8a5d76937cda40b40d74c0584196167c9 100644 (file)
@@ -370,7 +370,6 @@ DRWShadingGroup *shgroup_instance_screenspace(DRWPass *pass, struct GPUBatch *ge
        DRW_shgroup_uniform_float(grp, "size", size, 1);
        DRW_shgroup_uniform_float(grp, "pixel_size", DRW_viewport_pixelsize_get(), 1);
        DRW_shgroup_uniform_vec3(grp, "screen_vecs[0]", DRW_viewport_screenvecs_get(), 2);
-       DRW_shgroup_state_enable(grp, DRW_STATE_STIPPLE_3);
 
        return grp;
 }
index 65f3f38c0f1981e27552c430936994ccbf59a5b7..8eefd0587192396cfcaf822c16aa1b2930cc0377 100644 (file)
@@ -282,33 +282,6 @@ void drw_state_set(DRWState state)
                }
        }
 
-       /* Line Stipple */
-       {
-               int test;
-               if (CHANGED_ANY_STORE_VAR(
-                       DRW_STATE_STIPPLE_2 | DRW_STATE_STIPPLE_3 | DRW_STATE_STIPPLE_4,
-                       test))
-               {
-                       if (test) {
-                               if ((state & DRW_STATE_STIPPLE_2) != 0) {
-                                       setlinestyle(2);
-                               }
-                               else if ((state & DRW_STATE_STIPPLE_3) != 0) {
-                                       setlinestyle(3);
-                               }
-                               else if ((state & DRW_STATE_STIPPLE_4) != 0) {
-                                       setlinestyle(4);
-                               }
-                               else {
-                                       BLI_assert(0);
-                               }
-                       }
-                       else {
-                               setlinestyle(0);
-                       }
-               }
-       }
-
        /* Stencil */
        {
                DRWState test;