diff options
author | Hans Goudey <h.goudey@me.com> | 2022-04-05 19:30:49 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-04-05 19:31:18 +0300 |
commit | edcbf741df2f6d5567da123e1f4763cc82921ec8 (patch) | |
tree | 468815b4486f634f6bb3988c5a149f114fa77281 /source/blender/draw/intern/draw_cache_impl.h | |
parent | e51368728815e3700414a77bf91668425a9965ec (diff) |
Refactor: Evaluate surface objects as mesh components
This commit furthers some of the changes that were started in
rBb9febb54a492 and subsequent commits by changing the way surface
objects are presented to render engines and other users of evaluated
objects in the same way. Instead of presenting evaluated surface objects
as an `OB_SURF` object with an evaluated mesh, `OB_SURF` objects
can now have an evaluated geometry set, which uses the same system
as other object types to deal with multi-type evaluated data.
This clarification makes it more obvious that lots of code that dealt
with the `DispList` type isn't used. It wasn't before either, now it's
just *by design*. Over 1100 lines can be removed. The legacy curve
draw cache code is much simpler now too. The idea behind the further
removal of `DispList` is that it's better to focus optimization efforts
on a single mesh data structure.
One expected functional change is that the evaluated mesh from surface
objects can now be used in geometry nodes with the object info node.
Cycles and the OBJ IO tests had to be tweaked to avoid using evaluated
surface objects instead of the newly exposed mesh objects.
Differential Revision: https://developer.blender.org/D14550
Diffstat (limited to 'source/blender/draw/intern/draw_cache_impl.h')
-rw-r--r-- | source/blender/draw/intern/draw_cache_impl.h | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/source/blender/draw/intern/draw_cache_impl.h b/source/blender/draw/intern/draw_cache_impl.h index d262d1a5d4d..e728d8614de 100644 --- a/source/blender/draw/intern/draw_cache_impl.h +++ b/source/blender/draw/intern/draw_cache_impl.h @@ -104,16 +104,9 @@ int DRW_curve_material_count_get(struct Curve *cu); struct GPUBatch *DRW_curve_batch_cache_get_wire_edge(struct Curve *cu); struct GPUBatch *DRW_curve_batch_cache_get_normal_edge(struct Curve *cu); -struct GPUBatch *DRW_curve_batch_cache_get_edge_detection(struct Curve *cu, bool *r_is_manifold); struct GPUBatch *DRW_curve_batch_cache_get_edit_edges(struct Curve *cu); struct GPUBatch *DRW_curve_batch_cache_get_edit_verts(struct Curve *cu); -struct GPUBatch *DRW_curve_batch_cache_get_triangles_with_normals(struct Curve *cu); -struct GPUBatch **DRW_curve_batch_cache_get_surface_shaded(struct Curve *cu, - struct GPUMaterial **gpumat_array, - uint gpumat_array_len); -struct GPUBatch *DRW_curve_batch_cache_get_wireframes_face(struct Curve *cu); - /** \} */ /* -------------------------------------------------------------------- */ @@ -141,16 +134,8 @@ void DRW_displist_vertbuf_create_pos_and_nor(struct ListBase *lb, struct GPUVertBuf *vbo, const struct Scene *scene); void DRW_displist_vertbuf_create_wiredata(struct ListBase *lb, struct GPUVertBuf *vbo); -void DRW_displist_vertbuf_create_loop_pos_and_nor_and_uv_and_tan(struct ListBase *lb, - struct GPUVertBuf *vbo_pos_nor, - struct GPUVertBuf *vbo_uv, - struct GPUVertBuf *vbo_tan, - const struct Scene *scene); void DRW_displist_indexbuf_create_lines_in_order(struct ListBase *lb, struct GPUIndexBuf *ibo); void DRW_displist_indexbuf_create_triangles_in_order(struct ListBase *lb, struct GPUIndexBuf *ibo); -void DRW_displist_indexbuf_create_triangles_loop_split_by_material(struct ListBase *lb, - struct GPUIndexBuf **ibo_mat, - uint mat_len); void DRW_displist_indexbuf_create_edges_adjacency_lines(struct ListBase *lb, struct GPUIndexBuf *ibo, bool *r_is_manifold); @@ -309,7 +294,6 @@ struct GPUBatch *DRW_mesh_batch_cache_get_edit_mesh_analysis(struct Mesh *me); * \{ */ struct GPUVertBuf *DRW_mesh_batch_cache_pos_vertbuf_get(struct Mesh *me); -struct GPUVertBuf *DRW_curve_batch_cache_pos_vertbuf_get(struct Curve *cu); struct GPUVertBuf *DRW_mball_batch_cache_pos_vertbuf_get(struct Object *ob); int DRW_mesh_material_count_get(const struct Object *object, const struct Mesh *me); |