[Bf-codereview] On-surface brush (issue 5554059)

NicholasBishop at gmail.com NicholasBishop at gmail.com
Thu Jan 19 06:24:54 CET 2012


Reviewers: bf-codereview_blender.org,

Description:
This patch adds an optional brush display mode that visualizes the
intersection between the brush's sphere of influence and the mesh. The
code is based off Jason Wilkins' GSoC branch.

The most significant change from the original code is that it does not
require any copying or preservation of the GL depth buffer; instead the
PBVH is used to partially redraw the necessary parts of the depth
buffer. This could be a bit slower than making a copy of the depth
buffer, but I think that relies too much on graphics cards/drivers
behaving properly.

Unchanged, however, is a requirement on the stencil buffer. Currently
the patch unconditionally adds the stencil buffer to the
GL-initialization code for all platforms in GHOST. (I've only tested X11
here, the Mac and Win code I just copied over.) I'm not sure if this is
considered safe, or if we should have a compile-time option, or a
command-line startup option, or better run-time checking (i.e. if
drawable request fails, create a new request without the stencil buffer
bit.) Or some combination of these.

Please review this at http://codereview.appspot.com/5554059/

Affected files:
   intern/ghost/intern/GHOST_WindowCarbon.cpp
   intern/ghost/intern/GHOST_WindowCocoa.mm
   intern/ghost/intern/GHOST_WindowWin32.cpp
   intern/ghost/intern/GHOST_WindowX11.cpp
   release/scripts/startup/bl_ui/space_view3d_toolbar.py
   source/blender/blenkernel/intern/paint.c
   source/blender/editors/include/ED_view3d.h
   source/blender/editors/sculpt_paint/paint_cursor.c
   source/blender/editors/space_view3d/view3d_draw.c
   source/blender/gpu/GPU_draw.h
   source/blender/gpu/intern/gpu_draw.c
   source/blender/makesdna/DNA_scene_types.h
   source/blender/makesrna/intern/rna_sculpt_paint.c




More information about the Bf-codereview mailing list