diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2019-05-26 03:12:35 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2019-05-27 13:58:14 +0300 |
commit | ba75e93c8882df10d2027aa1ffa0347337b54160 (patch) | |
tree | af3511b55ac0b6d381366cf1c102cb02765c7406 /source/blender | |
parent | f3fc872171203e51109b6500bbaa969933997209 (diff) |
Cleanup: DRW: Remove DRW_STATE_OFFSET
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/draw/intern/DRW_render.h | 4 | ||||
-rw-r--r-- | source/blender/draw/intern/draw_manager_exec.c | 27 |
2 files changed, 0 insertions, 31 deletions
diff --git a/source/blender/draw/intern/DRW_render.h b/source/blender/draw/intern/DRW_render.h index 0f019df9d86..9de90dc5491 100644 --- a/source/blender/draw/intern/DRW_render.h +++ b/source/blender/draw/intern/DRW_render.h @@ -349,10 +349,6 @@ typedef enum { DRW_STATE_CLIP_PLANES = (1 << 22), DRW_STATE_WIRE_SMOOTH = (1 << 23), DRW_STATE_FIRST_VERTEX_CONVENTION = (1 << 24), - /** Polygon offset. Does not work with lines and points. */ - DRW_STATE_OFFSET_POSITIVE = (1 << 25), - /** Polygon offset. Does not work with lines and points. */ - DRW_STATE_OFFSET_NEGATIVE = (1 << 26), } DRWState; #define DRW_STATE_DEFAULT \ diff --git a/source/blender/draw/intern/draw_manager_exec.c b/source/blender/draw/intern/draw_manager_exec.c index 7c53d8f4fff..8c4acb1f2d2 100644 --- a/source/blender/draw/intern/draw_manager_exec.c +++ b/source/blender/draw/intern/draw_manager_exec.c @@ -306,33 +306,6 @@ void drw_state_set(DRWState state) } } - /* Polygon Offset */ - { - int test; - if (CHANGED_ANY_STORE_VAR(DRW_STATE_OFFSET_POSITIVE | DRW_STATE_OFFSET_NEGATIVE, test)) { - if (test) { - glEnable(GL_POLYGON_OFFSET_FILL); - glEnable(GL_POLYGON_OFFSET_LINE); - glEnable(GL_POLYGON_OFFSET_POINT); - /* Stencil Write */ - if ((state & DRW_STATE_OFFSET_POSITIVE) != 0) { - glPolygonOffset(1.0f, 1.0f); - } - else if ((state & DRW_STATE_OFFSET_NEGATIVE) != 0) { - glPolygonOffset(-1.0f, -1.0f); - } - else { - BLI_assert(0); - } - } - else { - glDisable(GL_POLYGON_OFFSET_FILL); - glDisable(GL_POLYGON_OFFSET_LINE); - glDisable(GL_POLYGON_OFFSET_POINT); - } - } - } - #undef CHANGED_TO #undef CHANGED_ANY #undef CHANGED_ANY_STORE_VAR |