From d11a87b88c4d76aff77912313752d23fffc8e65d Mon Sep 17 00:00:00 2001 From: Jeroen Bakker Date: Fri, 18 Dec 2020 16:06:26 +0100 Subject: DrawManager: High quality normals for non meshes This adds high quality normals for non meshes. These include * Volumetric Object Wireframe * Metaballs * Extracted Curves * Curves in edit mode This is in preparation to fix a regression in recent AMD drivers where the `GL_INT_2_10_10_10_REV` data type isn't working in Polaris cards. --- source/blender/draw/intern/draw_cache_impl.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'source/blender/draw/intern/draw_cache_impl.h') diff --git a/source/blender/draw/intern/draw_cache_impl.h b/source/blender/draw/intern/draw_cache_impl.h index 438acdca171..46b6cc7d708 100644 --- a/source/blender/draw/intern/draw_cache_impl.h +++ b/source/blender/draw/intern/draw_cache_impl.h @@ -87,7 +87,7 @@ void DRW_mesh_batch_cache_free_old(struct Mesh *me, int ctime); void DRW_vertbuf_create_wiredata(struct GPUVertBuf *vbo, const int vert_len); /* Curve */ -void DRW_curve_batch_cache_create_requested(struct Object *ob); +void DRW_curve_batch_cache_create_requested(struct Object *ob, const struct Scene *scene); int DRW_curve_material_count_get(struct Curve *cu); @@ -116,12 +116,15 @@ struct GPUBatch *DRW_metaball_batch_cache_get_edge_detection(struct Object *ob, bool *r_is_manifold); /* DispList */ -void DRW_displist_vertbuf_create_pos_and_nor(struct ListBase *lb, struct GPUVertBuf *vbo); +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); + 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, -- cgit v1.2.3