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-14 02:42:16 +0300
committerClément Foucault <foucault.clem@gmail.com>2018-12-14 18:17:29 +0300
commit18d056601303b96fcc934c639421e1fd59b36b63 (patch)
tree672bd9c367be9273d97e3ca124dc51afd76e59ed /source/blender/draw/intern/draw_cache_impl.h
parentc09913e9ddc2d93894549923a90ee471c3a368db (diff)
Curve Batch Cache: Add back support for shaded geometry
This changes a bit the batches data structure. Instead of using one vbo per material we use one for all material and use index buffers for selecting the correct triangles. This is less optimized than before but has potential to become more optimized by merging the wireframe data vbo into the shading one. Also the index buffers are not strictly necessary and could be just ranges inside the buffer. But this needs more adding things inside GPUIndexBuf.
Diffstat (limited to 'source/blender/draw/intern/draw_cache_impl.h')
-rw-r--r--source/blender/draw/intern/draw_cache_impl.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/draw/intern/draw_cache_impl.h b/source/blender/draw/intern/draw_cache_impl.h
index 6df7a896ffa..114d694041e 100644
--- a/source/blender/draw/intern/draw_cache_impl.h
+++ b/source/blender/draw/intern/draw_cache_impl.h
@@ -82,13 +82,13 @@ struct GPUBatch **DRW_metaball_batch_cache_get_surface_shaded(struct Object *ob,
struct GPUBatch *DRW_metaball_batch_cache_get_wireframes_face(struct Object *ob);
/* DispList */
-struct GPUVertBuf *DRW_displist_vertbuf_calc_pos_with_normals(struct ListBase *lb, struct GPUVertBuf *vbo);
-struct GPUIndexBuf *DRW_displist_indexbuf_calc_triangles_in_order(struct ListBase *lb, struct GPUIndexBuf *vbo);
-struct GPUIndexBuf **DRW_displist_indexbuf_calc_triangles_in_order_split_by_material(
- struct ListBase *lb, uint gpumat_array_len);
-struct GPUBatch **DRW_displist_batch_calc_tri_pos_normals_and_uv_split_by_material(
- struct ListBase *lb, uint gpumat_array_len);
-struct GPUBatch *DRW_displist_create_edges_overlay_batch(ListBase *lb, struct GPUVertBuf *vbo);
+void DRW_displist_vertbuf_create_pos_and_nor(struct ListBase *lb, struct GPUVertBuf *vbo);
+void DRW_displist_vertbuf_create_pos_and_nor_and_uv_tess(
+ struct ListBase *lb, struct GPUVertBuf *vbo_pos_nor, struct GPUVertBuf *vbo_uv);
+void DRW_displist_vertbuf_create_wireframe_data_tess(struct ListBase *lb, struct GPUVertBuf *vbo);
+void DRW_displist_indexbuf_create_triangles_in_order(struct ListBase *lb, struct GPUIndexBuf *vbo);
+void DRW_displist_indexbuf_create_triangles_tess_split_by_material(
+ struct ListBase *lb, struct GPUIndexBuf **ibo_mat, uint mat_len);
/* Lattice */
struct GPUBatch *DRW_lattice_batch_cache_get_all_edges(struct Lattice *lt, bool use_weight, const int actdef);