Fix #28347: VBO's highlights wrong faces when Mirror modifier is in use
authorSergey Sharybin <sergey.vfx@gmail.com>
Mon, 29 Aug 2011 16:07:44 +0000 (16:07 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Mon, 29 Aug 2011 16:07:44 +0000 (16:07 +0000)
commit88a538048bf7671db6a51fa2791ed1c87fa88611
tree15a400e318b1a4550d872243ebc7c47597289652
parent6cf447a29c0c8dbdb318e28e3c8c8f95f92f5152
Fix #28347: VBO's highlights wrong faces when Mirror modifier is in use

Added callback to drawMappedFaces which checks if two faces have got equal draw options.

After discussion with Brecht we found it's nicest solution for now:
- Disabling VBOs in edit mode for this case wouldn't be nicer for this case -
  some additional flag stored in DM should be added in this case.
- Adding new callback in DM isn't nicer that this solution.
- Handling face selection in drawobject would lead to duplicated code
  which is also not nice.

Hopefully, this callback could handle all cases in the future.

Also, Brecht mentioned current VBO implementation isn't perfect, so maybe
when we'll redesign this area dealing with edit mode wouldn't be so tricky.
source/blender/blenkernel/BKE_DerivedMesh.h
source/blender/blenkernel/intern/DerivedMesh.c
source/blender/blenkernel/intern/cdderivedmesh.c
source/blender/blenkernel/intern/subsurf_ccg.c
source/blender/editors/space_view3d/drawmesh.c
source/blender/editors/space_view3d/drawobject.c