diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2018-12-16 17:17:31 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2018-12-17 19:05:57 +0300 |
commit | 36cc42e79673bb15afeacdb674d925d8f8140046 (patch) | |
tree | 7f2f3ef63367982810742b816717f6f1f0a6214e /source/blender/draw/intern/draw_cache.h | |
parent | bc74e48680134ff195d6e76ac58b3c19e31b2803 (diff) |
Mesh Batch Cache: Optimization & Refactor shaded surface support
This now only upload data per loops to the GPU, making use of index buffer
to draw polygon. This make use of the vertex cache, speed up renders
and saves a lot of vram.
Update performance is also slightly faster and can even be improved further
by updating only uvs or vcol independently.
This commits breaks texture paint batches. It will be added back in another
commit.
Diffstat (limited to 'source/blender/draw/intern/draw_cache.h')
-rw-r--r-- | source/blender/draw/intern/draw_cache.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/source/blender/draw/intern/draw_cache.h b/source/blender/draw/intern/draw_cache.h index bfa672ea04c..b5c7c96db3e 100644 --- a/source/blender/draw/intern/draw_cache.h +++ b/source/blender/draw/intern/draw_cache.h @@ -53,10 +53,9 @@ struct GPUBatch *DRW_cache_screenspace_circle_get(void); struct GPUBatch *DRW_cache_object_wire_outline_get(struct Object *ob); struct GPUBatch *DRW_cache_object_edge_detection_get(struct Object *ob, bool *r_is_manifold); struct GPUBatch *DRW_cache_object_surface_get(struct Object *ob); -struct GPUBatch *DRW_cache_object_surface_get_ex(struct Object *ob, bool use_hide); struct GPUBatch *DRW_cache_object_loose_edges_get(struct Object *ob); struct GPUBatch **DRW_cache_object_surface_material_get( - struct Object *ob, struct GPUMaterial **gpumat_array, uint gpumat_array_len, bool use_hide, + struct Object *ob, struct GPUMaterial **gpumat_array, uint gpumat_array_len, char **auto_layer_names, int **auto_layer_is_srgb, int *auto_layer_count); struct GPUBatch *DRW_cache_object_face_wireframe_get(Object *ob); @@ -129,7 +128,7 @@ struct GPUBatch *DRW_cache_mesh_surface_overlay_get(struct Object *ob); struct GPUBatch *DRW_cache_face_centers_get(struct Object *ob); struct GPUBatch *DRW_cache_mesh_wire_outline_get(struct Object *ob); struct GPUBatch *DRW_cache_mesh_edge_detection_get(struct Object *ob, bool *r_is_manifold); -struct GPUBatch *DRW_cache_mesh_surface_get(struct Object *ob, bool use_hide); +struct GPUBatch *DRW_cache_mesh_surface_get(struct Object *ob); struct GPUBatch *DRW_cache_mesh_loose_edges_get(struct Object *ob); struct GPUBatch *DRW_cache_mesh_surface_weights_get(struct Object *ob, struct ToolSettings *ts, bool paint_mode); struct GPUBatch *DRW_cache_mesh_surface_vert_colors_get(struct Object *ob); @@ -140,9 +139,9 @@ struct GPUBatch *DRW_cache_mesh_edges_paint_overlay_get(struct Object *ob, bool struct GPUBatch *DRW_cache_mesh_faces_weight_overlay_get(struct Object *ob); struct GPUBatch *DRW_cache_mesh_verts_weight_overlay_get(struct Object *ob); struct GPUBatch **DRW_cache_mesh_surface_shaded_get( - struct Object *ob, struct GPUMaterial **gpumat_array, uint gpumat_array_len, bool use_hide, + struct Object *ob, struct GPUMaterial **gpumat_array, uint gpumat_array_len, char **auto_layer_names, int **auto_layer_is_srgb, int *auto_layer_count); -struct GPUBatch **DRW_cache_mesh_surface_texpaint_get(struct Object *ob, bool use_hide); +struct GPUBatch **DRW_cache_mesh_surface_texpaint_get(struct Object *ob); struct GPUBatch *DRW_cache_mesh_surface_texpaint_single_get(struct Object *ob); struct GPUBatch *DRW_cache_mesh_face_wireframe_get(struct Object *ob); |