1 #ifndef _included_d3_func_h_ 2 #define _included_d3_func_h_ 3 4 #ifdef __cplusplus 5 extern "C" { 6 #endif 7 8 9 /* KJL 14:24:45 12/4/97 - render state information */ 10 enum TRANSLUCENCY_TYPE 11 { 12 TRANSLUCENCY_OFF, 13 TRANSLUCENCY_NORMAL, 14 TRANSLUCENCY_INVCOLOUR, 15 TRANSLUCENCY_COLOUR, 16 TRANSLUCENCY_GLOWING, 17 TRANSLUCENCY_DARKENINGCOLOUR, 18 TRANSLUCENCY_JUSTSETZ, 19 TRANSLUCENCY_NOT_SET 20 }; 21 22 enum FILTERING_MODE_ID 23 { 24 FILTERING_BILINEAR_OFF, 25 FILTERING_BILINEAR_ON, 26 FILTERING_NOT_SET 27 }; 28 29 typedef struct 30 { 31 enum TRANSLUCENCY_TYPE TranslucencyMode; 32 enum FILTERING_MODE_ID FilteringMode; 33 int FogDistance; 34 unsigned int FogIsOn :1; 35 unsigned int WireFrameModeIsOn :1; 36 37 } RENDERSTATES; 38 39 typedef struct D3DTextureFormat { 40 // DDSURFACEDESC ddsd; /* DDSURFACEDESC for the surface description */ 41 BOOL Palette; /* is Palettized? */ 42 int RedBPP; /* #red bits per pixel */ 43 int BlueBPP; /* #blue bits per pixel */ 44 int GreenBPP; /* #green bits per pixel */ 45 int IndexBPP; /* number of bits in palette index */ 46 } D3DTEXTUREFORMAT; 47 48 #if 0 // disabled direct3d stuff 49 /* 50 Direct3D globals 51 */ 52 53 /* 54 Maximum number of Direct3D drivers ever 55 expected to be resident on the system. 56 */ 57 #define MAX_D3D_DRIVERS 5 58 /* 59 Maximum number of texture formats ever 60 expected to be reported by a Direct3D 61 driver. 62 */ 63 #define MAX_TEXTURE_FORMATS 10 64 65 /* 66 Description of a D3D driver. 67 */ 68 69 typedef struct D3DDriverInfo { 70 char Name[30]; /* short name of driver */ 71 char About[50]; /* string about driver */ 72 D3DDEVICEDESC Desc; /* full driver description */ 73 GUID Guid; /* wacky universally unique id thingy */ 74 BOOL Hardware; /* accelerated driver? */ 75 BOOL Textures; /* Texture mapping available? */ 76 BOOL ZBuffer; /* Z Buffering available? */ 77 } D3DDRIVERINFO; 78 79 /* 80 Description of a D3D driver texture 81 format. 82 */ 83 84 typedef struct D3DTextureFormat { 85 DDSURFACEDESC ddsd; /* DDSURFACEDESC for the surface description */ 86 BOOL Palette; /* is Palettized? */ 87 int RedBPP; /* #red bits per pixel */ 88 int BlueBPP; /* #blue bits per pixel */ 89 int GreenBPP; /* #green bits per pixel */ 90 int IndexBPP; /* number of bits in palette index */ 91 } D3DTEXTUREFORMAT; 92 93 94 typedef struct D3DInfo { 95 LPDIRECT3D lpD3D; 96 LPDIRECT3DDEVICE lpD3DDevice; 97 LPDIRECT3DVIEWPORT lpD3DViewport; 98 int NumDrivers; 99 int CurrentDriver; 100 D3DDEVICEDESC ThisDriver; 101 D3DDRIVERINFO Driver[MAX_D3D_DRIVERS]; 102 int CurrentTextureFormat; 103 int NumTextureFormats; 104 D3DTEXTUREFORMAT TextureFormat[MAX_TEXTURE_FORMATS]; 105 } D3DINFO; 106 107 108 109 /* KJL 14:24:45 12/4/97 - render state information */ 110 enum TRANSLUCENCY_TYPE 111 { 112 TRANSLUCENCY_OFF, 113 TRANSLUCENCY_NORMAL, 114 TRANSLUCENCY_INVCOLOUR, 115 TRANSLUCENCY_COLOUR, 116 TRANSLUCENCY_GLOWING, 117 TRANSLUCENCY_DARKENINGCOLOUR, 118 TRANSLUCENCY_JUSTSETZ, 119 TRANSLUCENCY_NOT_SET 120 }; 121 122 enum FILTERING_MODE_ID 123 { 124 FILTERING_BILINEAR_OFF, 125 FILTERING_BILINEAR_ON, 126 FILTERING_NOT_SET 127 }; 128 129 typedef struct 130 { 131 enum TRANSLUCENCY_TYPE TranslucencyMode; 132 enum FILTERING_MODE_ID FilteringMode; 133 int FogDistance; 134 unsigned int FogIsOn :1; 135 unsigned int WireFrameModeIsOn :1; 136 137 } RENDERSTATES; 138 139 #endif 140 141 142 143 144 #ifdef __cplusplus 145 } 146 #endif 147 148 #endif /* ! _included_d3_func_h_ */ 149