diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2008-11-30 18:55:14 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2008-11-30 18:55:14 +0300 |
commit | 42aa747ec036821e1cfe8bd3c314a8fb69ed56cd (patch) | |
tree | 17310cddec292b39aad44e0592e4cb922790d492 /source/blender/radiosity | |
parent | 5464c2e4a8ef638b898f04e3bf0edade367fc0b6 (diff) |
RNA
* DNA_radio_types.h: done. (patch by Jorge Bernal). Also adds
some #defines in the radiosity DNA since it was using hardcoded
values.
* Added an "UnknownType" which has no properties, useful as a
placeholder for pointers that have no defined type yet.
* Sort a few lists in the code alphabetically.
Diffstat (limited to 'source/blender/radiosity')
-rw-r--r-- | source/blender/radiosity/extern/include/radio_types.h | 4 | ||||
-rw-r--r-- | source/blender/radiosity/intern/source/raddisplay.c | 15 | ||||
-rw-r--r-- | source/blender/radiosity/intern/source/radio.c | 2 |
3 files changed, 9 insertions, 12 deletions
diff --git a/source/blender/radiosity/extern/include/radio_types.h b/source/blender/radiosity/extern/include/radio_types.h index 342e122cf36..5a218ee71be 100644 --- a/source/blender/radiosity/extern/include/radio_types.h +++ b/source/blender/radiosity/extern/include/radio_types.h @@ -41,10 +41,6 @@ struct Render; struct CustomData; -#define DTWIRE 0 -#define DTGOUR 2 -#define DTSOLID 1 - #define PI M_PI #define RAD_MAXFACETAB 1024 #define RAD_NEXTFACE(a) if( ((a) & 1023)==0 ) face= RG.facebase[(a)>>10]; else face++; diff --git a/source/blender/radiosity/intern/source/raddisplay.c b/source/blender/radiosity/intern/source/raddisplay.c index 4b6b18dc91c..753c2a5b58b 100644 --- a/source/blender/radiosity/intern/source/raddisplay.c +++ b/source/blender/radiosity/intern/source/raddisplay.c @@ -46,6 +46,7 @@ #include "BLI_blenlib.h" +#include "DNA_radio_types.h" #include "DNA_screen_types.h" #include "DNA_space_types.h" #include "DNA_view3d_types.h" @@ -312,8 +313,8 @@ void drawlimits() /* center around cent */ short cox=0, coy=1; - if((RG.flag & 3)==2) coy= 2; - if((RG.flag & 3)==3) { + if((RG.flag & (RAD_SHOWLIMITS|RAD_SHOWZ))==RAD_SHOWZ) coy= 2; + if((RG.flag & (RAD_SHOWLIMITS|RAD_SHOWZ))==(RAD_SHOWLIMITS|RAD_SHOWZ)) { cox= 1; coy= 2; } @@ -392,7 +393,7 @@ void RAD_drawall(int depth_is_on) } if(RG.totface) { - if(RG.drawtype==DTGOUR) { + if(RG.drawtype==RAD_GOURAUD) { glShadeModel(GL_SMOOTH); for(a=0; a<RG.totface; a++) { RAD_NEXTFACE(a); @@ -400,7 +401,7 @@ void RAD_drawall(int depth_is_on) drawfaceGour(face); } } - else if(RG.drawtype==DTSOLID) { + else if(RG.drawtype==RAD_SOLID) { for(a=0; a<RG.totface; a++) { RAD_NEXTFACE(a); @@ -418,13 +419,13 @@ void RAD_drawall(int depth_is_on) } else { el= RG.elem; - if(RG.drawtype==DTGOUR) { + if(RG.drawtype==RAD_GOURAUD) { glShadeModel(GL_SMOOTH); for(a=RG.totelem; a>0; a--, el++) { drawnodeGour(*el); } } - else if(RG.drawtype==DTSOLID) { + else if(RG.drawtype==RAD_SOLID) { for(a=RG.totelem; a>0; a--, el++) { drawnodeSolid(*el); } @@ -439,7 +440,7 @@ void RAD_drawall(int depth_is_on) glShadeModel(GL_FLAT); if(RG.totpatch) { - if(RG.flag & 3) { + if(RG.flag & (RAD_SHOWLIMITS|RAD_SHOWZ)) { if(depth_is_on) glDisable(GL_DEPTH_TEST); drawlimits(); if(depth_is_on) glEnable(GL_DEPTH_TEST); diff --git a/source/blender/radiosity/intern/source/radio.c b/source/blender/radiosity/intern/source/radio.c index cd4234d5eaf..ec4a0eec490 100644 --- a/source/blender/radiosity/intern/source/radio.c +++ b/source/blender/radiosity/intern/source/radio.c @@ -258,7 +258,7 @@ void add_radio() rad->convergence= 0.1; rad->radfac= 30.0; rad->gamma= 2.0; - rad->drawtype= DTSOLID; + rad->drawtype= RAD_SOLID; rad->subshootp= 1; rad->subshoote= 2; rad->maxsublamp= 0; |