Edit Mesh: Refactor Edit cage drawing to use old style drawing
authorClément Foucault <foucault.clem@gmail.com>
Mon, 4 Feb 2019 00:13:51 +0000 (01:13 +0100)
committerClément Foucault <foucault.clem@gmail.com>
Tue, 5 Feb 2019 14:02:15 +0000 (15:02 +0100)
commit86193d25dbe5470a465dd91655c6aeaabab19b21
tree9be350eeb300a08be68c1cdcaf59ea48f5724dcb
parentf3f2602c88d866db6052ed03bbec1c9da4183e57
Edit Mesh: Refactor Edit cage drawing to use old style drawing

This is work in progress. Look is not final.

This align data VBO data structure used for edti cage drawing to the one
use for normal drawing.

We no longer use barycentric coords to draw the lines an just rasterize
line primitives for edge drawing. This is a bit slower than using the
previous fast method but faster than the "correct" (edge artifact free)
method. This also make the code way simpler.

This also makes it possible to reuse possible and normal vbos used for
shading if the edit cage matches the

This also touches the UV batch code to share as much render data as
possible. The code also prepare for edit cage "modified" drawing cage (with
modifier applied) but is not enabled since selection and operators does not
work with modified cage yet.
18 files changed:
source/blender/draw/intern/draw_cache_impl.h
source/blender/draw/intern/draw_cache_impl_curve.c
source/blender/draw/intern/draw_cache_impl_lattice.c
source/blender/draw/intern/draw_cache_impl_mesh.c
source/blender/draw/modes/edit_mesh_mode.c
source/blender/draw/modes/shaders/common_globals_lib.glsl
source/blender/draw/modes/shaders/edit_curve_overlay_handle_geom.glsl
source/blender/draw/modes/shaders/edit_curve_overlay_loosevert_vert.glsl
source/blender/draw/modes/shaders/edit_lattice_overlay_frag.glsl
source/blender/draw/modes/shaders/edit_mesh_overlay_common_lib.glsl
source/blender/draw/modes/shaders/edit_mesh_overlay_facefill_vert.glsl
source/blender/draw/modes/shaders/edit_mesh_overlay_frag.glsl
source/blender/draw/modes/shaders/edit_mesh_overlay_vert.glsl
source/blender/draw/modes/shaders/paint_vert_frag.glsl
source/blender/gpu/shaders/gpu_shader_2D_edituvs_edges_vert.glsl
source/blender/gpu/shaders/gpu_shader_2D_edituvs_facedots_vert.glsl
source/blender/gpu/shaders/gpu_shader_2D_edituvs_faces_vert.glsl
source/blender/gpu/shaders/gpu_shader_2D_edituvs_points_vert.glsl