DRW: Change Procedural function to use a GPUBatch
This is in order to have VAO handled by thoses batches instead of using a common VAO. Even if the VAO has no importance in these case using a batch will help when transitioning to Vulkan.
This commit is contained in:
@@ -152,8 +152,8 @@ typedef struct DRWCall {
|
||||
uint count;
|
||||
} instances;
|
||||
struct { /* type == DRW_CALL_PROCEDURAL */
|
||||
GPUBatch *geometry;
|
||||
uint vert_count;
|
||||
GPUPrimType prim_type;
|
||||
} procedural;
|
||||
};
|
||||
|
||||
@@ -438,6 +438,11 @@ void drw_debug_init(void);
|
||||
void drw_batch_cache_validate(Object *ob);
|
||||
void drw_batch_cache_generate_requested(struct Object *ob);
|
||||
|
||||
/* Procedural Drawing */
|
||||
GPUBatch *drw_cache_procedural_points_get(void);
|
||||
GPUBatch *drw_cache_procedural_lines_get(void);
|
||||
GPUBatch *drw_cache_procedural_triangles_get(void);
|
||||
|
||||
extern struct GPUVertFormat *g_pos_format;
|
||||
|
||||
#endif /* __DRAW_MANAGER_H__ */
|
||||
|
||||
Reference in New Issue
Block a user