diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2019-05-17 15:04:30 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2019-05-17 19:17:23 +0300 |
commit | 97d22e12b521a04e1d8809704bfeae8d526b24a8 (patch) | |
tree | eb26a45b4afccf8ed3e353167e328c2ebc743da5 /source/blender/draw/intern/DRW_render.h | |
parent | 02319549c3061562349cf8ed98b3d77b88804824 (diff) |
Cleanup: DRW: Remove uneeded DRWState values
This removes:
- DRW_STATE_TRANS_FEEDBACK
- DRW_STATE_WIRE
- DRW_STATE_POINT
Diffstat (limited to 'source/blender/draw/intern/DRW_render.h')
-rw-r--r-- | source/blender/draw/intern/DRW_render.h | 68 |
1 files changed, 36 insertions, 32 deletions
diff --git a/source/blender/draw/intern/DRW_render.h b/source/blender/draw/intern/DRW_render.h index cf7e9521053..6d290f9a2d3 100644 --- a/source/blender/draw/intern/DRW_render.h +++ b/source/blender/draw/intern/DRW_render.h @@ -313,43 +313,47 @@ void DRW_shader_free(struct GPUShader *shader); /* Batches */ typedef enum { + /** Wrtie mask */ DRW_STATE_WRITE_DEPTH = (1 << 0), DRW_STATE_WRITE_COLOR = (1 << 1), - DRW_STATE_DEPTH_ALWAYS = (1 << 2), - DRW_STATE_DEPTH_LESS = (1 << 3), - DRW_STATE_DEPTH_LESS_EQUAL = (1 << 4), - DRW_STATE_DEPTH_EQUAL = (1 << 5), - DRW_STATE_DEPTH_GREATER = (1 << 6), - DRW_STATE_DEPTH_GREATER_EQUAL = (1 << 7), - DRW_STATE_CULL_BACK = (1 << 8), - DRW_STATE_CULL_FRONT = (1 << 9), - DRW_STATE_WIRE = (1 << 10), /* TODO remove */ - DRW_STATE_POINT = (1 << 11), /* TODO remove */ + DRW_STATE_WRITE_STENCIL = (1 << 2), + DRW_STATE_WRITE_STENCIL_SHADOW_PASS = (1 << 3), + DRW_STATE_WRITE_STENCIL_SHADOW_FAIL = (1 << 4), + + /** Depth test */ + DRW_STATE_DEPTH_ALWAYS = (1 << 5), + DRW_STATE_DEPTH_LESS = (1 << 6), + DRW_STATE_DEPTH_LESS_EQUAL = (1 << 7), + DRW_STATE_DEPTH_EQUAL = (1 << 8), + DRW_STATE_DEPTH_GREATER = (1 << 9), + DRW_STATE_DEPTH_GREATER_EQUAL = (1 << 10), + /** Culling test */ + DRW_STATE_CULL_BACK = (1 << 11), + DRW_STATE_CULL_FRONT = (1 << 12), + /** Stencil test */ + DRW_STATE_STENCIL_EQUAL = (1 << 13), + DRW_STATE_STENCIL_NEQUAL = (1 << 14), + + /** Blend state */ + DRW_STATE_ADDITIVE = (1 << 15), + /** Same as additive but let alpha accumulate without premult. */ + DRW_STATE_ADDITIVE_FULL = (1 << 16), + DRW_STATE_BLEND = (1 << 17), + /** Use that if color is already premult by alpha. */ + DRW_STATE_BLEND_PREMUL = (1 << 18), + DRW_STATE_BLEND_PREMUL_UNDER = (1 << 19), + DRW_STATE_BLEND_OIT = (1 << 20), + DRW_STATE_MULTIPLY = (1 << 21), + + 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 << 12), + DRW_STATE_OFFSET_POSITIVE = (1 << 25), /** Polygon offset. Does not work with lines and points. */ - DRW_STATE_OFFSET_NEGATIVE = (1 << 13), - DRW_STATE_WIRE_WIDE = (1 << 14), - DRW_STATE_BLEND = (1 << 15), - DRW_STATE_ADDITIVE = (1 << 16), - DRW_STATE_MULTIPLY = (1 << 17), - DRW_STATE_BLEND_PREMUL_UNDER = (1 << 18), - DRW_STATE_CLIP_PLANES = (1 << 19), - /** Same as DRW_STATE_ADDITIVE but let alpha accumulate without premult. */ - DRW_STATE_ADDITIVE_FULL = (1 << 20), - /** Use that if color is already premult by alpha. */ - DRW_STATE_BLEND_PREMUL = (1 << 21), - DRW_STATE_WIRE_SMOOTH = (1 << 22), - DRW_STATE_TRANS_FEEDBACK = (1 << 23), - DRW_STATE_BLEND_OIT = (1 << 24), - DRW_STATE_FIRST_VERTEX_CONVENTION = (1 << 25), - - DRW_STATE_WRITE_STENCIL = (1 << 27), - DRW_STATE_WRITE_STENCIL_SHADOW_PASS = (1 << 28), - DRW_STATE_WRITE_STENCIL_SHADOW_FAIL = (1 << 29), - DRW_STATE_STENCIL_EQUAL = (1 << 30), - DRW_STATE_STENCIL_NEQUAL = (1 << 31), + DRW_STATE_OFFSET_NEGATIVE = (1 << 26), } DRWState; + #define DRW_STATE_DEFAULT \ (DRW_STATE_WRITE_DEPTH | DRW_STATE_WRITE_COLOR | DRW_STATE_DEPTH_LESS_EQUAL) #define DRW_STATE_RASTERIZER_ENABLED \ |