diff options
author | Ton Roosendaal <ton@blender.org> | 2005-07-13 23:42:08 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2005-07-13 23:42:08 +0400 |
commit | 75ae1ae5ef0d3bb37cd3a5c70699955cb207dcde (patch) | |
tree | dddd08d35bafcd07be90d330dbd72859e9b3df45 /source/blender/src/view.c | |
parent | 64af8d0ced696fd1ab3dbb452e1dda2a43843f6f (diff) |
Armature "XRay mode" now draws nicely with solid too. For it to work, I
had to add a new feature to the 3d window, to collect "after draw" objects,
which get drawn as last, after a clear of the zbuffer.
Same method can be used for nice OpenGL transparent draw, the system is
ready for it, do that later.
The huge commit is caused by cleaning up globals from struct Global. Many
variables were unused or just not needed anymore. Did that to move the ugly
G.zbuf to where it belongs, in the View3D space struct. :)
Diffstat (limited to 'source/blender/src/view.c')
-rw-r--r-- | source/blender/src/view.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/src/view.c b/source/blender/src/view.c index c15f6211b48..ff7438dc840 100644 --- a/source/blender/src/view.c +++ b/source/blender/src/view.c @@ -886,7 +886,7 @@ short view3d_opengl_select(unsigned int *buffer, unsigned int bufsize, short x1 Mat4MulMat4(G.vd->persmat, G.vd->viewmat, curarea->winmat); if(G.vd->drawtype > OB_WIRE) { - G.zbuf= TRUE; + G.vd->zbuf= TRUE; glEnable(GL_DEPTH_TEST); } @@ -903,6 +903,7 @@ short view3d_opengl_select(unsigned int *buffer, unsigned int bufsize, short x1 draw_object(BASACT); } else { + G.vd->xray= TRUE; // otherwise it postpones drawing base= G.scene->base.first; while(base) { if(base->lay & G.vd->lay) { @@ -913,6 +914,7 @@ short view3d_opengl_select(unsigned int *buffer, unsigned int bufsize, short x1 } base= base->next; } + G.vd->xray= FALSE; // restore } glPopName(); /* see above (pushname) */ hits= glRenderMode(GL_RENDER); @@ -923,7 +925,7 @@ short view3d_opengl_select(unsigned int *buffer, unsigned int bufsize, short x1 Mat4MulMat4(G.vd->persmat, G.vd->viewmat, curarea->winmat); if(G.vd->drawtype > OB_WIRE) { - G.zbuf= 0; + G.vd->zbuf= 0; glDisable(GL_DEPTH_TEST); } persp(PERSP_WIN); |