Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2018-12-04 03:30:07 +0300
committerClément Foucault <foucault.clem@gmail.com>2018-12-04 19:52:32 +0300
commitf1975a46390a5bf85bb7012375f9bc1e761fc516 (patch)
treea88b08c31c9ec6e8c3482831380b2663dc922954 /source/blender/draw/intern/draw_cache_impl.h
parent89ef69d23c079d1006fdffc9fb63199eabc257a7 (diff)
Wireframe: Optimization: Only draw triangles that have edges
This only happens after a certain threshold. We sort triangles into 2 bins (start and end of the buffer) based on a threshold and just draw the start bin if the wireframe slider is low enough. This optimization is disabled for deformed meshes. This should help resolve (to some extent) T58188.
Diffstat (limited to 'source/blender/draw/intern/draw_cache_impl.h')
-rw-r--r--source/blender/draw/intern/draw_cache_impl.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/draw/intern/draw_cache_impl.h b/source/blender/draw/intern/draw_cache_impl.h
index 720d54ad011..5e2061f7fe5 100644
--- a/source/blender/draw/intern/draw_cache_impl.h
+++ b/source/blender/draw/intern/draw_cache_impl.h
@@ -77,13 +77,13 @@ struct GPUBatch **DRW_curve_batch_cache_get_surface_shaded(
struct GPUMaterial **gpumat_array, uint gpumat_array_len);
void DRW_curve_batch_cache_get_wireframes_face_texbuf(
struct Curve *cu, struct CurveCache *ob_curve_cache,
- struct GPUTexture **verts_data, struct GPUTexture **face_indices, int *tri_count);
+ struct GPUTexture **verts_data, struct GPUTexture **face_indices, int *tri_count, bool reduce_len);
/* Metaball */
struct GPUBatch *DRW_metaball_batch_cache_get_triangles_with_normals(struct Object *ob);
struct GPUBatch **DRW_metaball_batch_cache_get_surface_shaded(struct Object *ob, struct MetaBall *mb, struct GPUMaterial **gpumat_array, uint gpumat_array_len);
void DRW_metaball_batch_cache_get_wireframes_face_texbuf(
- struct Object *ob, struct GPUTexture **verts_data, struct GPUTexture **face_indices, int *tri_count);
+ struct Object *ob, struct GPUTexture **verts_data, struct GPUTexture **face_indices, int *tri_count, bool reduce_len);
/* Curve (Font) */
struct GPUBatch *DRW_curve_batch_cache_get_overlay_cursor(struct Curve *cu);
@@ -162,7 +162,7 @@ struct GPUBatch *DRW_mesh_batch_cache_get_edges_with_select_id(struct Mesh *me,
struct GPUBatch *DRW_mesh_batch_cache_get_verts_with_select_id(struct Mesh *me, uint select_id_offset);
/* Object mode Wireframe overlays */
void DRW_mesh_batch_cache_get_wireframes_face_texbuf(
- struct Mesh *me, struct GPUTexture **verts_data, struct GPUTexture **face_indices, int *tri_count);
+ struct Mesh *me, struct GPUTexture **verts_data, struct GPUTexture **face_indices, int *tri_count, bool reduce_len);
void DRW_mesh_cache_sculpt_coords_ensure(struct Mesh *me);