Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2005-07-13 23:42:08 +0400
committerTon Roosendaal <ton@blender.org>2005-07-13 23:42:08 +0400
commit75ae1ae5ef0d3bb37cd3a5c70699955cb207dcde (patch)
treedddd08d35bafcd07be90d330dbd72859e9b3df45 /source/blender/radiosity
parent64af8d0ced696fd1ab3dbb452e1dda2a43843f6f (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/radiosity')
-rw-r--r--source/blender/radiosity/extern/include/radio.h2
-rw-r--r--source/blender/radiosity/intern/source/raddisplay.c50
2 files changed, 5 insertions, 47 deletions
diff --git a/source/blender/radiosity/extern/include/radio.h b/source/blender/radiosity/extern/include/radio.h
index aebfaaaccc0..81fd9fdda2e 100644
--- a/source/blender/radiosity/extern/include/radio.h
+++ b/source/blender/radiosity/extern/include/radio.h
@@ -154,8 +154,6 @@ extern void drawsingnodeWire(RNode *rn);
extern void drawnodeSolid(RNode *rn);
extern void drawnodeGour(RNode *rn);
extern void drawpatch(RPatch *patch, unsigned int col);
-extern void drawnode_ext(RNode *rn, unsigned int col);
-extern void drawOverflowElem(void);
extern void drawfaceGour(Face *face);
extern void drawfaceSolid(Face *face);
extern void drawfaceWire(Face *face);
diff --git a/source/blender/radiosity/intern/source/raddisplay.c b/source/blender/radiosity/intern/source/raddisplay.c
index 6c0fe17d8ad..79d40cbab7d 100644
--- a/source/blender/radiosity/intern/source/raddisplay.c
+++ b/source/blender/radiosity/intern/source/raddisplay.c
@@ -202,9 +202,8 @@ void drawnodeGour(RNode *rn)
void drawpatch_ext(RPatch *patch, unsigned int col)
{
ScrArea *sa, *oldsa;
-
+ View3D *v3d;
glDrawBuffer(GL_FRONT);
- if(G.zbuf) glDisable(GL_DEPTH_TEST);
cpack(col);
@@ -213,10 +212,14 @@ void drawpatch_ext(RPatch *patch, unsigned int col)
sa= G.curscreen->areabase.first;
while(sa) {
if (sa->spacetype==SPACE_VIEW3D) {
+ v3d= sa->spacedata.first;
+
/* use mywinget() here: otherwise it draws in header */
if(sa->win != mywinget()) areawinset(sa->win);
persp(PERSP_VIEW);
+ if(v3d->zbuf) glDisable(GL_DEPTH_TEST);
drawnodeWire(patch->first);
+ if(v3d->zbuf) glEnable(GL_DEPTH_TEST); // pretty useless?
}
sa= sa->next;
}
@@ -225,51 +228,8 @@ void drawpatch_ext(RPatch *patch, unsigned int col)
glFlush();
glDrawBuffer(GL_BACK);
- if(G.zbuf) glEnable(GL_DEPTH_TEST);
-}
-
-void drawnode_ext(RNode *rn, unsigned int col)
-{
-
- glDrawBuffer(GL_FRONT);
- if(G.zbuf) glDisable(GL_DEPTH_TEST);
-
- cpack(col);
-
- drawnodeWire(rn);
-
- glDrawBuffer(GL_BACK);
- if(G.zbuf) glEnable(GL_DEPTH_TEST);
}
-void drawOverflowElem()
-{
- RNode **el, *rn;
- float *fp;
- int a;
-
- glDrawBuffer(GL_FRONT);
- if(G.zbuf) glDisable(GL_DEPTH_TEST);
-
- cpack(0xFF9900);
-
- el= RG.elem;
- fp= RG.formfactors;
- for(a=0; a<RG.totelem; a++, el++, fp++) {
- if(*fp>1.0) {
- rn= *el;
- glBegin(GL_LINE_LOOP);
- glVertex3fv( rn->v1);
- glVertex3fv( rn->v2);
- glVertex3fv( rn->v3);
- if(rn->type==4) glVertex3fv( rn->v4);
- glEnd();
- }
- }
-
- glDrawBuffer(GL_BACK);
- if(G.zbuf) glEnable(GL_DEPTH_TEST);
-}
void drawfaceGour(Face *face)
{