diff options
author | Ton Roosendaal <ton@blender.org> | 2004-09-25 17:42:31 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2004-09-25 17:42:31 +0400 |
commit | 6f074f6f461066777f5d7546882c44d8ba0288db (patch) | |
tree | 895be0ba83b83da3e1a8aee7c228dcb29ba121b2 /source/blender/src/drawmesh.c | |
parent | cfe9a9575526458412d50cc6122fdde1d66dd4d2 (diff) |
Two nice workflow improvements;
- Zbuffer clipped selection
Based on same algos as for drawing (blender polygon offset) vertices, edges
and faces now are clipped for draw and selection when Zbuffer is used.
Note that it works for endpoint vertices of edges, and for facecenters.
Also works for border and circle-select
- Optimal draw subsurfs
This now draws optimal with faces and edges selected/unselected, hiding the
original 'cage' (mesh) completely.
TODO: edge select, which still uses original (invisible) edge.
http://www.blender3d.org/cms/Mesh_editing_rewrite.425.0.html
Diffstat (limited to 'source/blender/src/drawmesh.c')
-rw-r--r-- | source/blender/src/drawmesh.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/source/blender/src/drawmesh.c b/source/blender/src/drawmesh.c index a4041dc6d4b..e45a288f9ff 100644 --- a/source/blender/src/drawmesh.c +++ b/source/blender/src/drawmesh.c @@ -499,7 +499,6 @@ void draw_tfaces3D(Object *ob, Mesh *me) float *v1, *v2, *v3, *v4; float *av1= NULL, *av2= NULL, *av3= NULL, *av4= NULL, *extverts= NULL; int a, activeFaceInSelection= 0; - extern void bPolygonOffset(short val); if(me==0 || me->tface==0) return; @@ -508,7 +507,7 @@ void draw_tfaces3D(Object *ob, Mesh *me) glEnable(GL_DEPTH_TEST); glDisable(GL_LIGHTING); - bPolygonOffset(1); + bglPolygonOffset(G.vd->dist); /* Draw (Hidden) Edges */ if(G.f & G_DRAWEDGES || G.f & G_HIDDENEDGES){ @@ -632,7 +631,7 @@ void draw_tfaces3D(Object *ob, Mesh *me) /* Draw Stippled Outline for selected faces */ mface= me->mface; tface= me->tface; - bPolygonOffset(1); + bglPolygonOffset(G.vd->dist); for(a=me->totface; a>0; a--, mface++, tface++) { if(mface->v3==0) continue; if(tface->flag & TF_HIDE) continue; @@ -705,10 +704,7 @@ void draw_tfaces3D(Object *ob, Mesh *me) setlinestyle(0); } - /* We added 2 offsets, so go back 2, and disable */ - bPolygonOffset(-1); - bPolygonOffset(-1); - bPolygonOffset(0); + bglPolygonOffset(0.0); // resets correctly now, even after calling accumulated offsets } static int set_gl_light(Object *ob) |