diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2020-03-09 18:27:24 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2020-03-09 18:27:24 +0300 |
commit | 29f3af95272590d26f610ae828b2eeee89c82a00 (patch) | |
tree | a696a58a2561c48f7ec6166e369e22081e0a64d8 /source/blender/draw/intern/draw_manager.h | |
parent | dcb93126876879d969a30a7865700abd072066f8 (diff) |
GPencil: Refactor of Draw Engine, Vertex Paint and all internal functions
This commit is a full refactor of the grease pencil modules including Draw Engine, Modifiers, VFX, depsgraph update, improvements in operators and conversion of Sculpt and Weight paint tools to real brushes.
Also, a huge code cleanup has been done at all levels.
Thanks to @fclem for his work and yo @pepeland and @mendio for the testing and help in the development.
Differential Revision: https://developer.blender.org/D6293
Diffstat (limited to 'source/blender/draw/intern/draw_manager.h')
-rw-r--r-- | source/blender/draw/intern/draw_manager.h | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/source/blender/draw/intern/draw_manager.h b/source/blender/draw/intern/draw_manager.h index 6d415ee95b3..cb825becd73 100644 --- a/source/blender/draw/intern/draw_manager.h +++ b/source/blender/draw/intern/draw_manager.h @@ -181,7 +181,8 @@ typedef enum { DRW_CMD_DRAW = 0, /* Only sortable type. Must be 0. */ DRW_CMD_DRAW_RANGE = 1, DRW_CMD_DRAW_INSTANCE = 2, - DRW_CMD_DRAW_PROCEDURAL = 3, + DRW_CMD_DRAW_INSTANCE_RANGE = 3, + DRW_CMD_DRAW_PROCEDURAL = 4, /* Other Commands */ DRW_CMD_CLEAR = 12, DRW_CMD_DRWSTATE = 13, @@ -200,6 +201,7 @@ typedef struct DRWCommandDraw { /* Assume DRWResourceHandle to be 0. */ typedef struct DRWCommandDrawRange { GPUBatch *batch; + DRWResourceHandle handle; uint vert_first; uint vert_count; } DRWCommandDrawRange; @@ -211,6 +213,13 @@ typedef struct DRWCommandDrawInstance { uint use_attribs; /* bool */ } DRWCommandDrawInstance; +typedef struct DRWCommandDrawInstanceRange { + GPUBatch *batch; + DRWResourceHandle handle; + uint inst_first; + uint inst_count; +} DRWCommandDrawInstanceRange; + typedef struct DRWCommandDrawProcedural { GPUBatch *batch; DRWResourceHandle handle; @@ -224,7 +233,9 @@ typedef struct DRWCommandSetMutableState { } DRWCommandSetMutableState; typedef struct DRWCommandSetStencil { - uint mask; + uint write_mask; + uint comp_mask; + uint ref; } DRWCommandSetStencil; typedef struct DRWCommandSetSelectID { @@ -243,6 +254,7 @@ typedef union DRWCommand { DRWCommandDraw draw; DRWCommandDrawRange range; DRWCommandDrawInstance instance; + DRWCommandDrawInstanceRange instance_range; DRWCommandDrawProcedural procedural; DRWCommandSetMutableState state; DRWCommandSetStencil stencil; @@ -273,6 +285,7 @@ typedef enum { DRW_UNIFORM_BLOCK_OBMATS, DRW_UNIFORM_BLOCK_OBINFOS, DRW_UNIFORM_RESOURCE_CHUNK, + DRW_UNIFORM_RESOURCE_ID, /** Legacy / Fallback */ DRW_UNIFORM_BASE_INSTANCE, DRW_UNIFORM_MODEL_MATRIX, @@ -469,7 +482,6 @@ typedef struct DRWManager { /* Managed by `DRW_state_set`, `DRW_state_reset` */ DRWState state; DRWState state_lock; - uint stencil_mask; /* Per viewport */ GPUViewport *viewport; |