diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2011-09-21 01:22:15 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2011-09-21 01:22:15 +0400 |
commit | 9c42afb1c02cafa21632bd2e19b47c012a230368 (patch) | |
tree | 90d7e190e9ba59437f1e3e31337984a2200aa764 /source/blender/makesdna/DNA_material_types.h | |
parent | 5582d9fac13123397297db54a0478a63a1b75194 (diff) | |
parent | 8f5112f191e24aac86da7b70f461a50825e764da (diff) |
Merged changes in the trunk up to revision 40413.
Conflicts resolved:
source/blender/makesrna/intern/rna_scene.c
Diffstat (limited to 'source/blender/makesdna/DNA_material_types.h')
-rw-r--r-- | source/blender/makesdna/DNA_material_types.h | 40 |
1 files changed, 38 insertions, 2 deletions
diff --git a/source/blender/makesdna/DNA_material_types.h b/source/blender/makesdna/DNA_material_types.h index e94e394d255..35b905a71bf 100644 --- a/source/blender/makesdna/DNA_material_types.h +++ b/source/blender/makesdna/DNA_material_types.h @@ -74,6 +74,14 @@ typedef struct VolumeSettings { float ms_spread; } VolumeSettings; +/* Game Engine Options (old Texface mode, transp and flag) */ +typedef struct GameSettings { + int flag; + int alpha_blend; + int face_orientation; + int pad1; +} GameSettings; + typedef struct Material { ID id; struct AnimData *adt; /* animation data (must be immediately after id for utilities to use it) */ @@ -90,6 +98,7 @@ typedef struct Material { /* end synced with render_types.h */ struct VolumeSettings vol; + struct GameSettings game; float fresnel_mir, fresnel_mir_i; float fresnel_tra, fresnel_tra_i; @@ -169,12 +178,39 @@ typedef struct Material { ListBase gpumaterial; /* runtime */ } Material; + +/* **************** GAME PROPERTIES ********************* */ +// Blend Transparency Options - alpha_blend /* match GPU_material::GPUBlendMode */ +#define GEMAT_SOLID 0 /* GPU_BLEND_SOLID */ +#define GEMAT_ADD 1 /* GPU_BLEND_ADD */ +#define GEMAT_ALPHA 2 /* GPU_BLEND_ALPHA */ +#define GEMAT_CLIP 4 /* GPU_BLEND_CLIP */ +#define GEMAT_ALPHA_SORT 8 /* GPU_BLEND_ALPHA_SORT */ + +// Game Options - flag +#define GEMAT_BACKCULL 16 /* KX_BACKCULL */ +#define GEMAT_SHADED 32 /* KX_LIGHT */ +#define GEMAT_TEXT 64 /* RAS_RENDER_3DPOLYGON_TEXT */ +#define GEMAT_NOPHYSICS 128 +#define GEMAT_INVISIBLE 256 + +// Face Orientation Options - face_orientation +#define GEMAT_NORMAL 0 +#define GEMAT_HALO 512 /* BILLBOARD_SCREENALIGNED */ +#define GEMAT_BILLBOARD 1024 /* BILLBOARD_AXISALIGNED */ +#define GEMAT_SHADOW 2048 /* SHADOW */ + +// Use Textures - not defined directly in the UI +#define GEMAT_TEX 4096 /* KX_TEX */ + + /* **************** MATERIAL ********************* */ /* maximum number of materials per material array. * (on object, mesh, lamp, etc.). limited by - * short mat_nr in verts, faces. */ -#define MAXMAT 32767 + * short mat_nr in verts, faces. + * -1 becayse for active material we store the index + 1 */ +#define MAXMAT (32767-1) /* material_type */ #define MA_TYPE_SURFACE 0 |