diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2018-05-25 13:43:02 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2018-05-30 13:25:20 +0300 |
commit | 3bc0cb08b82b9b3de7c0e6d66317f501922b0390 (patch) | |
tree | b2b090ac635fccfd4b0fe5bf07b23988ad513a7d /source/blender/draw/intern/draw_manager.h | |
parent | 7b9a0ed8c47dfef03e8b21cafae3b5438bc93415 (diff) |
DRW: Add DRW_CALL_PROCEDURAL DRWCall type.
This mimics the behaviour of DRW_shgroup_empty_tri_batch_create and will
replace it eventually.
The advantage is that it's compatible with transform feedback.
Diffstat (limited to 'source/blender/draw/intern/draw_manager.h')
-rw-r--r-- | source/blender/draw/intern/draw_manager.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/draw/intern/draw_manager.h b/source/blender/draw/intern/draw_manager.h index 267826d2d9a..f2b941810a7 100644 --- a/source/blender/draw/intern/draw_manager.h +++ b/source/blender/draw/intern/draw_manager.h @@ -127,6 +127,7 @@ typedef enum { DRW_CALL_SINGLE, /* A single batch */ DRW_CALL_INSTANCES, /* Draw instances without any instancing attribs. */ DRW_CALL_GENERATE, /* Uses a callback to draw with any number of batches. */ + DRW_CALL_PROCEDURAL, /* Generate a drawcall without any Gwn_Batch. */ } DRWCallType; typedef struct DRWCall { @@ -146,6 +147,10 @@ typedef struct DRWCall { DRWCallGenerateFn *geometry_fn; void *user_data; } generate; + struct { /* type == DRW_CALL_PROCEDURAL */ + unsigned int prim_count; + Gwn_PrimType prim_type; + } procedural; }; DRWCallType type; |