1 | ' d3d9types.sbp
|
---|
2 |
|
---|
3 | Const D3DCOLOR_ARGB(a,r,g,b) = ((a and &HFF)<<24) or ((r and &HFF)<<16) or ((g and &HFF)<<8) or (b and &HFF)
|
---|
4 | Const D3DCOLOR_RGBA(r,g,b,a) = D3DCOLOR_ARGB(a,r,g,b)
|
---|
5 | Const D3DCOLOR_XRGB(r,g,b) = D3DCOLOR_ARGB(&HFF,r,g,b)
|
---|
6 |
|
---|
7 | Const D3DCOLOR_COLORVALUE(r,g,b,a) = D3DCOLOR_RGBA(r*255,g*255,b*255,a*255)
|
---|
8 |
|
---|
9 |
|
---|
10 | Type D3DVECTOR
|
---|
11 | x As Single
|
---|
12 | y As Single
|
---|
13 | z As Single
|
---|
14 | End Type
|
---|
15 |
|
---|
16 | Type D3DCOLORVALUE
|
---|
17 | r As Single
|
---|
18 | g As Single
|
---|
19 | b As Single
|
---|
20 | a As Single
|
---|
21 | End Type
|
---|
22 |
|
---|
23 | Type D3DRECT
|
---|
24 | x1 As Long
|
---|
25 | y1 As Long
|
---|
26 | x2 As Long
|
---|
27 | y2 As Long
|
---|
28 | End Type
|
---|
29 |
|
---|
30 | Type D3DMATRIX
|
---|
31 | m[3,3] As Single
|
---|
32 | End Type
|
---|
33 |
|
---|
34 | Type D3DVIEWPORT9
|
---|
35 | X As DWord
|
---|
36 | Y As DWord
|
---|
37 | Width As DWord
|
---|
38 | Height As DWord
|
---|
39 | MinZ As Single
|
---|
40 | MaxZ As Single
|
---|
41 | End Type
|
---|
42 |
|
---|
43 | ' Max number of user clipping planes, supported in D3D.
|
---|
44 | Const D3DMAXUSERCLIPPLANES = 32
|
---|
45 |
|
---|
46 | ' These bits could be ORed together to use with D3DRS_CLIPPLANEENABLE
|
---|
47 | Const D3DCLIPPLANE0 = 1 << 0
|
---|
48 | Const D3DCLIPPLANE1 = 1 << 1
|
---|
49 | Const D3DCLIPPLANE2 = 1 << 2
|
---|
50 | Const D3DCLIPPLANE3 = 1 << 3
|
---|
51 | Const D3DCLIPPLANE4 = 1 << 4
|
---|
52 | Const D3DCLIPPLANE5 = 1 << 5
|
---|
53 |
|
---|
54 | Const D3DCS_LEFT = &H00000001
|
---|
55 | Const D3DCS_RIGHT = &H00000002
|
---|
56 | Const D3DCS_TOP = &H00000004
|
---|
57 | Const D3DCS_BOTTOM = &H00000008
|
---|
58 | Const D3DCS_FRONT = &H00000010
|
---|
59 | Const D3DCS_BACK = &H00000020
|
---|
60 | Const D3DCS_PLANE0 = &H00000040
|
---|
61 | Const D3DCS_PLANE1 = &H00000080
|
---|
62 | Const D3DCS_PLANE2 = &H00000100
|
---|
63 | Const D3DCS_PLANE3 = &H00000200
|
---|
64 | Const D3DCS_PLANE4 = &H00000400
|
---|
65 | Const D3DCS_PLANE5 = &H00000800
|
---|
66 | Const D3DCS_ALL = D3DCS_LEFT or D3DCS_RIGHT or D3DCS_TOP or D3DCS_BOTTOM or D3DCS_FRONT or D3DCS_BACK or D3DCS_PLANE0 or D3DCS_PLANE1 or D3DCS_PLANE2 or D3DCS_PLANE3 or D3DCS_PLANE4 or D3DCS_PLANE5
|
---|
67 | Type D3DCLIPSTATUS9
|
---|
68 | ClipUnion As DWord
|
---|
69 | ClipIntersection As DWord
|
---|
70 | End Type
|
---|
71 |
|
---|
72 | Type D3DMATERIAL9
|
---|
73 | Diffuse As D3DCOLORVALUE
|
---|
74 | Ambient As D3DCOLORVALUE
|
---|
75 | Specular As D3DCOLORVALUE
|
---|
76 | Emissive As D3DCOLORVALUE
|
---|
77 | Power As Single
|
---|
78 | End Type
|
---|
79 |
|
---|
80 | Const Enum D3DLIGHTTYPE
|
---|
81 | D3DLIGHT_POINT = 1
|
---|
82 | D3DLIGHT_SPOT = 2
|
---|
83 | D3DLIGHT_DIRECTIONAL = 3
|
---|
84 | D3DLIGHT_FORCE_DWORD = &H7FFFFFFF
|
---|
85 | End Enum
|
---|
86 |
|
---|
87 | Type D3DLIGHT9
|
---|
88 | Type_ As D3DLIGHTTYPE
|
---|
89 | Diffuse As D3DCOLORVALUE
|
---|
90 | Specular As D3DCOLORVALUE
|
---|
91 | Ambient As D3DCOLORVALUE
|
---|
92 | Position As D3DVECTOR
|
---|
93 | Direction As D3DVECTOR
|
---|
94 | Range As Single
|
---|
95 | Falloff As Single
|
---|
96 | Attenuation0 As Single
|
---|
97 | Attenuation1 As Single
|
---|
98 | Attenuation2 As Single
|
---|
99 | Theta As Single
|
---|
100 | Phi As Single
|
---|
101 | End Type
|
---|
102 |
|
---|
103 |
|
---|
104 | ' Options for clearing
|
---|
105 | Const D3DCLEAR_TARGET = &H00000001 'Clear target surface
|
---|
106 | Const D3DCLEAR_ZBUFFER = &H00000002 'Clear target z buffer
|
---|
107 | Const D3DCLEAR_STENCIL = &H00000004 'Clear stencil planes
|
---|
108 |
|
---|
109 |
|
---|
110 | ' The following defines the rendering states
|
---|
111 | Const Enum D3DSHADEMODE
|
---|
112 | D3DSHADE_FLAT = 1
|
---|
113 | D3DSHADE_GOURAUD = 2
|
---|
114 | D3DSHADE_PHONG = 3
|
---|
115 | D3DSHADE_FORCE_DWORD = &H7FFFFFFF
|
---|
116 | End Enum
|
---|
117 |
|
---|
118 | Const Enum D3DFILLMODE
|
---|
119 | D3DFILL_POINT = 1
|
---|
120 | D3DFILL_WIREFRAME = 2
|
---|
121 | D3DFILL_SOLID = 3
|
---|
122 | D3DFILL_FORCE_DWORD = &H7FFFFFFF
|
---|
123 | End Enum
|
---|
124 |
|
---|
125 | Const Enum D3DBLEND
|
---|
126 | D3DBLEND_ZERO = 1
|
---|
127 | D3DBLEND_ONE = 2
|
---|
128 | D3DBLEND_SRCCOLOR = 3
|
---|
129 | D3DBLEND_INVSRCCOLOR = 4
|
---|
130 | D3DBLEND_SRCALPHA = 5
|
---|
131 | D3DBLEND_INVSRCALPHA = 6
|
---|
132 | D3DBLEND_DESTALPHA = 7
|
---|
133 | D3DBLEND_INVDESTALPHA = 8
|
---|
134 | D3DBLEND_DESTCOLOR = 9
|
---|
135 | D3DBLEND_INVDESTCOLOR = 10
|
---|
136 | D3DBLEND_SRCALPHASAT = 11
|
---|
137 | D3DBLEND_BOTHSRCALPHA = 12
|
---|
138 | D3DBLEND_BOTHINVSRCALPHA = 13
|
---|
139 | D3DBLEND_BLENDFACTOR = 14 'Only supported if D3DPBLENDCAPS_BLENDFACTOR is on
|
---|
140 | D3DBLEND_INVBLENDFACTOR = 15 'Only supported if D3DPBLENDCAPS_BLENDFACTOR is on
|
---|
141 |
|
---|
142 | D3DBLEND_FORCE_DWORD = &H7FFFFFFF
|
---|
143 | End Enum
|
---|
144 |
|
---|
145 | Const Enum D3DBLENDOP
|
---|
146 | D3DBLENDOP_ADD = 1
|
---|
147 | D3DBLENDOP_SUBTRACT = 2
|
---|
148 | D3DBLENDOP_REVSUBTRACT = 3
|
---|
149 | D3DBLENDOP_MIN = 4
|
---|
150 | D3DBLENDOP_MAX = 5
|
---|
151 | D3DBLENDOP_FORCE_DWORD = &H7FFFFFFF
|
---|
152 | End Enum
|
---|
153 |
|
---|
154 | Const Enum D3DTEXTUREADDRESS
|
---|
155 | D3DTADDRESS_WRAP = 1
|
---|
156 | D3DTADDRESS_MIRROR = 2
|
---|
157 | D3DTADDRESS_CLAMP = 3
|
---|
158 | D3DTADDRESS_BORDER = 4
|
---|
159 | D3DTADDRESS_MIRRORONCE = 5
|
---|
160 | D3DTADDRESS_FORCE_DWORD = &H7FFFFFFF
|
---|
161 | End Enum
|
---|
162 |
|
---|
163 | Const Enum D3DCULL
|
---|
164 | D3DCULL_NONE = 1
|
---|
165 | D3DCULL_CW = 2
|
---|
166 | D3DCULL_CCW = 3
|
---|
167 | D3DCULL_FORCE_DWORD = &H7FFFFFFF
|
---|
168 | End Enum
|
---|
169 |
|
---|
170 | Const Enum D3DCMPFUNC
|
---|
171 | D3DCMP_NEVER = 1
|
---|
172 | D3DCMP_LESS = 2
|
---|
173 | D3DCMP_EQUAL = 3
|
---|
174 | D3DCMP_LESSEQUAL = 4
|
---|
175 | D3DCMP_GREATER = 5
|
---|
176 | D3DCMP_NOTEQUAL = 6
|
---|
177 | D3DCMP_GREATEREQUAL = 7
|
---|
178 | D3DCMP_ALWAYS = 8
|
---|
179 | D3DCMP_FORCE_DWORD = &H7FFFFFFF
|
---|
180 | End Enum
|
---|
181 |
|
---|
182 | Const Enum D3DSTENCILOP
|
---|
183 | D3DSTENCILOP_KEEP = 1
|
---|
184 | D3DSTENCILOP_ZERO = 2
|
---|
185 | D3DSTENCILOP_REPLACE = 3
|
---|
186 | D3DSTENCILOP_INCRSAT = 4
|
---|
187 | D3DSTENCILOP_DECRSAT = 5
|
---|
188 | D3DSTENCILOP_INVERT = 6
|
---|
189 | D3DSTENCILOP_INCR = 7
|
---|
190 | D3DSTENCILOP_DECR = 8
|
---|
191 | D3DSTENCILOP_FORCE_DWORD = &H7FFFFFFF
|
---|
192 | End Enum
|
---|
193 |
|
---|
194 | Const Enum D3DFOGMODE
|
---|
195 | D3DFOG_NONE = 0
|
---|
196 | D3DFOG_EXP = 1
|
---|
197 | D3DFOG_EXP2 = 2
|
---|
198 | D3DFOG_LINEAR = 3
|
---|
199 | D3DFOG_FORCE_DWORD = &H7FFFFFFF
|
---|
200 | End Enum
|
---|
201 |
|
---|
202 | Const Enum D3DZBUFFERTYPE
|
---|
203 | D3DZB_FALSE = 0
|
---|
204 | D3DZB_TRUE = 1 'Z buffering
|
---|
205 | D3DZB_USEW = 2 'W buffering
|
---|
206 | D3DZB_FORCE_DWORD = &H7FFFFFFF
|
---|
207 | End Enum
|
---|
208 |
|
---|
209 | ' Primitives supported by draw-primitive API
|
---|
210 | Const Enum D3DPRIMITIVETYPE
|
---|
211 | D3DPT_POINTLIST = 1
|
---|
212 | D3DPT_LINELIST = 2
|
---|
213 | D3DPT_LINESTRIP = 3
|
---|
214 | D3DPT_TRIANGLELIST = 4
|
---|
215 | D3DPT_TRIANGLESTRIP = 5
|
---|
216 | D3DPT_TRIANGLEFAN = 6
|
---|
217 | D3DPT_FORCE_DWORD = &H7FFFFFFF
|
---|
218 | End Enum
|
---|
219 |
|
---|
220 |
|
---|
221 | Const D3DTS_WORLDMATRIX(index) = index + 256
|
---|
222 | Const Enum D3DTRANSFORMSTATETYPE
|
---|
223 | D3DTS_VIEW = 2
|
---|
224 | D3DTS_PROJECTION = 3
|
---|
225 | D3DTS_TEXTURE0 = 16
|
---|
226 | D3DTS_TEXTURE1 = 17
|
---|
227 | D3DTS_TEXTURE2 = 18
|
---|
228 | D3DTS_TEXTURE3 = 19
|
---|
229 | D3DTS_TEXTURE4 = 20
|
---|
230 | D3DTS_TEXTURE5 = 21
|
---|
231 | D3DTS_TEXTURE6 = 22
|
---|
232 | D3DTS_TEXTURE7 = 23
|
---|
233 | D3DTS_WORLD = D3DTS_WORLDMATRIX(0)
|
---|
234 | D3DTS_WORLD1 = D3DTS_WORLDMATRIX(1)
|
---|
235 | D3DTS_WORLD2 = D3DTS_WORLDMATRIX(2)
|
---|
236 | D3DTS_WORLD3 = D3DTS_WORLDMATRIX(3)
|
---|
237 | D3DTS_FORCE_DWORD = &H7FFFFFFF
|
---|
238 | End Enum
|
---|
239 |
|
---|
240 | Const Enum D3DRENDERSTATETYPE
|
---|
241 | D3DRS_ZENABLE = 7 'D3DZBUFFERTYPE (or TRUE/FALSE for legacy)
|
---|
242 | D3DRS_FILLMODE = 8 'D3DFILLMODE
|
---|
243 | D3DRS_SHADEMODE = 9 'D3DSHADEMODE
|
---|
244 | D3DRS_ZWRITEENABLE = 14 'TRUE to enable z writes
|
---|
245 | D3DRS_ALPHATESTENABLE = 15 'TRUE to enable alpha tests
|
---|
246 | D3DRS_LASTPIXEL = 16 'TRUE for last-pixel on lines
|
---|
247 | D3DRS_SRCBLEND = 19 'D3DBLEND
|
---|
248 | D3DRS_DESTBLEND = 20 'D3DBLEND
|
---|
249 | D3DRS_CULLMODE = 22 'D3DCULL
|
---|
250 | D3DRS_ZFUNC = 23 'D3DCMPFUNC
|
---|
251 | D3DRS_ALPHAREF = 24 'D3DFIXED
|
---|
252 | D3DRS_ALPHAFUNC = 25 'D3DCMPFUNC
|
---|
253 | D3DRS_DITHERENABLE = 26 'TRUE to enable dithering
|
---|
254 | D3DRS_ALPHABLENDENABLE = 27 'TRUE to enable alpha blending
|
---|
255 | D3DRS_FOGENABLE = 28 'TRUE to enable fog blending
|
---|
256 | D3DRS_SPECULARENABLE = 29 'TRUE to enable specular
|
---|
257 | D3DRS_FOGCOLOR = 34 'D3DCOLOR
|
---|
258 | D3DRS_FOGTABLEMODE = 35 'D3DFOGMODE
|
---|
259 | D3DRS_FOGSTART = 36 'Fog start (for both vertex and pixel fog)
|
---|
260 | D3DRS_FOGEND = 37 'Fog end
|
---|
261 | D3DRS_FOGDENSITY = 38 'Fog density
|
---|
262 | D3DRS_RANGEFOGENABLE = 48 'Enables range-based fog
|
---|
263 | D3DRS_STENCILENABLE = 52 'BOOL enable/disable stenciling
|
---|
264 | D3DRS_STENCILFAIL = 53 'D3DSTENCILOP to do if stencil test fails
|
---|
265 | D3DRS_STENCILZFAIL = 54 'D3DSTENCILOP to do if stencil test passes and Z test fails
|
---|
266 | D3DRS_STENCILPASS = 55 'D3DSTENCILOP to do if both stencil and Z tests pass
|
---|
267 | D3DRS_STENCILFUNC = 56 'D3DCMPFUNC fn. Stencil Test passes if ((ref & mask) stencilfn (stencil & mask)) is true
|
---|
268 | D3DRS_STENCILREF = 57 'Reference value used in stencil test
|
---|
269 | D3DRS_STENCILMASK = 58 'Mask value used in stencil test
|
---|
270 | D3DRS_STENCILWRITEMASK = 59 'Write mask applied to values written to stencil buffer
|
---|
271 | D3DRS_TEXTUREFACTOR = 60 'D3DCOLOR used for multi-texture blend
|
---|
272 | D3DRS_WRAP0 = 128 'wrap for 1st texture coord. set
|
---|
273 | D3DRS_WRAP1 = 129 'wrap for 2nd texture coord. set
|
---|
274 | D3DRS_WRAP2 = 130 'wrap for 3rd texture coord. set
|
---|
275 | D3DRS_WRAP3 = 131 'wrap for 4th texture coord. set
|
---|
276 | D3DRS_WRAP4 = 132 'wrap for 5th texture coord. set
|
---|
277 | D3DRS_WRAP5 = 133 'wrap for 6th texture coord. set
|
---|
278 | D3DRS_WRAP6 = 134 'wrap for 7th texture coord. set
|
---|
279 | D3DRS_WRAP7 = 135 'wrap for 8th texture coord. set
|
---|
280 | D3DRS_CLIPPING = 136
|
---|
281 | D3DRS_LIGHTING = 137
|
---|
282 | D3DRS_AMBIENT = 139
|
---|
283 | D3DRS_FOGVERTEXMODE = 140
|
---|
284 | D3DRS_COLORVERTEX = 141
|
---|
285 | D3DRS_LOCALVIEWER = 142
|
---|
286 | D3DRS_NORMALIZENORMALS = 143
|
---|
287 | D3DRS_DIFFUSEMATERIALSOURCE = 145
|
---|
288 | D3DRS_SPECULARMATERIALSOURCE = 146
|
---|
289 | D3DRS_AMBIENTMATERIALSOURCE = 147
|
---|
290 | D3DRS_EMISSIVEMATERIALSOURCE = 148
|
---|
291 | D3DRS_VERTEXBLEND = 151
|
---|
292 | D3DRS_CLIPPLANEENABLE = 152
|
---|
293 | D3DRS_POINTSIZE = 154 'float point size
|
---|
294 | D3DRS_POINTSIZE_MIN = 155 'float point size min threshold
|
---|
295 | D3DRS_POINTSPRITEENABLE = 156 'BOOL point texture coord control
|
---|
296 | D3DRS_POINTSCALEENABLE = 157 'BOOL point size scale enable
|
---|
297 | D3DRS_POINTSCALE_A = 158 'float point attenuation A value
|
---|
298 | D3DRS_POINTSCALE_B = 159 'float point attenuation B value
|
---|
299 | D3DRS_POINTSCALE_C = 160 'float point attenuation C value
|
---|
300 | D3DRS_MULTISAMPLEANTIALIAS = 161 ' BOOL - set to do FSAA with multisample buffer
|
---|
301 | D3DRS_MULTISAMPLEMASK = 162 ' DWORD - per-sample enable/disable
|
---|
302 | D3DRS_PATCHEDGESTYLE = 163 ' Sets whether patch edges will use float style tessellation
|
---|
303 | D3DRS_DEBUGMONITORTOKEN = 165 ' DEBUG ONLY - token to debug monitor
|
---|
304 | D3DRS_POINTSIZE_MAX = 166 'float point size max threshold
|
---|
305 | D3DRS_INDEXEDVERTEXBLENDENABLE = 167
|
---|
306 | D3DRS_COLORWRITEENABLE = 168 ' per-channel write enable
|
---|
307 | D3DRS_TWEENFACTOR = 170 ' float tween factor
|
---|
308 | D3DRS_BLENDOP = 171 ' D3DBLENDOP setting
|
---|
309 | D3DRS_POSITIONDEGREE = 172 ' NPatch position interpolation degree. D3DDEGREE_LINEAR or D3DDEGREE_CUBIC (default)
|
---|
310 | D3DRS_NORMALDEGREE = 173 ' NPatch normal interpolation degree. D3DDEGREE_LINEAR (default) or D3DDEGREE_QUADRATIC
|
---|
311 | D3DRS_SCISSORTESTENABLE = 174
|
---|
312 | D3DRS_SLOPESCALEDEPTHBIAS = 175
|
---|
313 | D3DRS_ANTIALIASEDLINEENABLE = 176
|
---|
314 | D3DRS_MINTESSELLATIONLEVEL = 178
|
---|
315 | D3DRS_MAXTESSELLATIONLEVEL = 179
|
---|
316 | D3DRS_ADAPTIVETESS_X = 180
|
---|
317 | D3DRS_ADAPTIVETESS_Y = 181
|
---|
318 | D3DRS_ADAPTIVETESS_Z = 182
|
---|
319 | D3DRS_ADAPTIVETESS_W = 183
|
---|
320 | D3DRS_ENABLEADAPTIVETESSELLATION = 184
|
---|
321 | D3DRS_TWOSIDEDSTENCILMODE = 185 'BOOL enable/disable 2 sided stenciling
|
---|
322 | D3DRS_CCW_STENCILFAIL = 186 'D3DSTENCILOP to do if ccw stencil test fails
|
---|
323 | D3DRS_CCW_STENCILZFAIL = 187 'D3DSTENCILOP to do if ccw stencil test passes and Z test fails
|
---|
324 | D3DRS_CCW_STENCILPASS = 188 'D3DSTENCILOP to do if both ccw stencil and Z tests pass
|
---|
325 | D3DRS_CCW_STENCILFUNC = 189 'D3DCMPFUNC fn. ccw Stencil Test passes if ((ref & mask) stencilfn (stencil & mask)) is true
|
---|
326 | D3DRS_COLORWRITEENABLE1 = 190 'Additional ColorWriteEnables for the devices that support D3DPMISCCAPS_INDEPENDENTWRITEMASKS
|
---|
327 | D3DRS_COLORWRITEENABLE2 = 191 'Additional ColorWriteEnables for the devices that support D3DPMISCCAPS_INDEPENDENTWRITEMASKS
|
---|
328 | D3DRS_COLORWRITEENABLE3 = 192 'Additional ColorWriteEnables for the devices that support D3DPMISCCAPS_INDEPENDENTWRITEMASKS
|
---|
329 | D3DRS_BLENDFACTOR = 193 'D3DCOLOR used for a constant blend factor during alpha blending for devices that support D3DPBLENDCAPS_BLENDFACTOR
|
---|
330 | D3DRS_SRGBWRITEENABLE = 194 'Enable rendertarget writes to be DE-linearized to SRGB (for formats that expose D3DUSAGE_QUERY_SRGBWRITE)
|
---|
331 | D3DRS_DEPTHBIAS = 195
|
---|
332 | D3DRS_WRAP8 = 198 'Additional wrap states for vs_3_0+ attributes with D3DDECLUSAGE_TEXCOORD
|
---|
333 | D3DRS_WRAP9 = 199
|
---|
334 | D3DRS_WRAP10 = 200
|
---|
335 | D3DRS_WRAP11 = 201
|
---|
336 | D3DRS_WRAP12 = 202
|
---|
337 | D3DRS_WRAP13 = 203
|
---|
338 | D3DRS_WRAP14 = 204
|
---|
339 | D3DRS_WRAP15 = 205
|
---|
340 | D3DRS_SEPARATEALPHABLENDENABLE = 206 'TRUE to enable a separate blending function for the alpha channel
|
---|
341 | D3DRS_SRCBLENDALPHA = 207 'SRC blend factor for the alpha channel when D3DRS_SEPARATEDESTALPHAENABLE is TRUE
|
---|
342 | D3DRS_DESTBLENDALPHA = 208 'DST blend factor for the alpha channel when D3DRS_SEPARATEDESTALPHAENABLE is TRUE
|
---|
343 | D3DRS_BLENDOPALPHA = 209 'Blending operation for the alpha channel when D3DRS_SEPARATEDESTALPHAENABLE is TRUE
|
---|
344 | D3DRS_FORCE_DWORD = &H7FFFFFFF
|
---|
345 | End Enum
|
---|
346 |
|
---|
347 | ' Values for material source
|
---|
348 | Const Enum D3DMATERIALCOLORSOURCE
|
---|
349 | D3DMCS_MATERIAL = 0 'Color from material is used
|
---|
350 | D3DMCS_COLOR1 = 1 'Diffuse vertex color is used
|
---|
351 | D3DMCS_COLOR2 = 2 'Specular vertex color is used
|
---|
352 | D3DMCS_FORCE_DWORD = &H7FFFFFFF
|
---|
353 | End Enum
|
---|
354 |
|
---|
355 | ' Bias to apply to the texture coordinate set to apply a wrap to.
|
---|
356 | Const D3DRENDERSTATE_WRAPBIAS = 128
|
---|
357 |
|
---|
358 | ' Flags to construct the WRAP render states
|
---|
359 | Const D3DWRAP_U = &H00000001
|
---|
360 | Const D3DWRAP_V = &H00000002
|
---|
361 | Const D3DWRAP_W = &H00000004
|
---|
362 |
|
---|
363 | ' Flags to construct the WRAP render states for 1D thru 4D texture coordinates
|
---|
364 | Const D3DWRAPCOORD_0 = &H00000001 'same as D3DWRAP_U
|
---|
365 | Const D3DWRAPCOORD_1 = &H00000002 'same as D3DWRAP_V
|
---|
366 | Const D3DWRAPCOORD_2 = &H00000004 'same as D3DWRAP_W
|
---|
367 | Const D3DWRAPCOORD_3 = &H00000008
|
---|
368 |
|
---|
369 | ' Flags to construct D3DRS_COLORWRITEENABLE
|
---|
370 | Const D3DCOLORWRITEENABLE_RED = 1<<0
|
---|
371 | Const D3DCOLORWRITEENABLE_GREEN = 1<<1
|
---|
372 | Const D3DCOLORWRITEENABLE_BLUE = 1<<2
|
---|
373 | Const D3DCOLORWRITEENABLE_ALPHA = 1<<3
|
---|
374 |
|
---|
375 |
|
---|
376 | ' State enumerants for per-stage processing of fixed function pixel processing
|
---|
377 | ' Two of these affect fixed function vertex processing as well: TEXTURETRANSFORMFLAGS and TEXCOORDINDEX.
|
---|
378 | Const Enum D3DTEXTURESTAGESTATETYPE
|
---|
379 | D3DTSS_COLOROP = 1 'D3DTEXTUREOP - per-stage blending controls for color channels
|
---|
380 | D3DTSS_COLORARG1 = 2 'D3DTA_* (texture arg)
|
---|
381 | D3DTSS_COLORARG2 = 3 'D3DTA_* (texture arg)
|
---|
382 | D3DTSS_ALPHAOP = 4 'D3DTEXTUREOP - per-stage blending controls for alpha channel
|
---|
383 | D3DTSS_ALPHAARG1 = 5 'D3DTA_* (texture arg)
|
---|
384 | D3DTSS_ALPHAARG2 = 6 'D3DTA_* (texture arg)
|
---|
385 | D3DTSS_BUMPENVMAT00 = 7 'float (bump mapping matrix)
|
---|
386 | D3DTSS_BUMPENVMAT01 = 8 'float (bump mapping matrix)
|
---|
387 | D3DTSS_BUMPENVMAT10 = 9 'float (bump mapping matrix)
|
---|
388 | D3DTSS_BUMPENVMAT11 = 10 'float (bump mapping matrix)
|
---|
389 | D3DTSS_TEXCOORDINDEX = 11 'identifies which set of texture coordinates index this texture
|
---|
390 | D3DTSS_BUMPENVLSCALE = 22 'float scale for bump map luminance
|
---|
391 | D3DTSS_BUMPENVLOFFSET = 23 'float offset for bump map luminance
|
---|
392 | D3DTSS_TEXTURETRANSFORMFLAGS = 24 'D3DTEXTURETRANSFORMFLAGS controls texture transform
|
---|
393 | D3DTSS_COLORARG0 = 26 'D3DTA_* third arg for triadic ops
|
---|
394 | D3DTSS_ALPHAARG0 = 27 'D3DTA_* third arg for triadic ops
|
---|
395 | D3DTSS_RESULTARG = 28 'D3DTA_* arg for result (CURRENT or TEMP)
|
---|
396 | D3DTSS_CONSTANT = 32 'Per-stage constant D3DTA_CONSTANT
|
---|
397 |
|
---|
398 | D3DTSS_FORCE_DWORD = &H7FFFFFFF
|
---|
399 | End Enum
|
---|
400 |
|
---|
401 |
|
---|
402 | ' State enumerants for per-sampler texture processing.
|
---|
403 | Const Enum D3DSAMPLERSTATETYPE
|
---|
404 | D3DSAMP_ADDRESSU = 1 'D3DTEXTUREADDRESS for U coordinate
|
---|
405 | D3DSAMP_ADDRESSV = 2 'D3DTEXTUREADDRESS for V coordinate
|
---|
406 | D3DSAMP_ADDRESSW = 3 'D3DTEXTUREADDRESS for W coordinate
|
---|
407 | D3DSAMP_BORDERCOLOR = 4 'D3DCOLOR
|
---|
408 | D3DSAMP_MAGFILTER = 5 'D3DTEXTUREFILTER filter to use for magnification
|
---|
409 | D3DSAMP_MINFILTER = 6 'D3DTEXTUREFILTER filter to use for minification
|
---|
410 | D3DSAMP_MIPFILTER = 7 'D3DTEXTUREFILTER filter to use between mipmaps during minification
|
---|
411 | D3DSAMP_MIPMAPLODBIAS = 8 'float Mipmap LOD bias
|
---|
412 | D3DSAMP_MAXMIPLEVEL = 9 'DWORD 0..(n-1) LOD index of largest map to use (0 == largest)
|
---|
413 | D3DSAMP_MAXANISOTROPY = 10 'DWORD maximum anisotropy
|
---|
414 | D3DSAMP_SRGBTEXTURE = 11 'Default = 0 (which means Gamma 1.0,
|
---|
415 | ' no correction required.) else correct for
|
---|
416 | ' Gamma = 2.2
|
---|
417 | D3DSAMP_ELEMENTINDEX = 12 'When multi-element texture is assigned to sampler, this
|
---|
418 | ' indicates which element index to use. Default = 0.
|
---|
419 | D3DSAMP_DMAPOFFSET = 13 'Offset in vertices in the pre-sampled displacement map.
|
---|
420 | ' Only valid for D3DDMAPSAMPLER sampler
|
---|
421 |
|
---|
422 | D3DSAMP_FORCE_DWORD = &H7FFFFFFF
|
---|
423 | End Enum
|
---|
424 |
|
---|
425 | ' Special sampler which is used in the tesselator
|
---|
426 | Const D3DDMAPSAMPLER = 256
|
---|
427 |
|
---|
428 | ' Samplers used in vertex shaders
|
---|
429 | Const D3DVERTEXTEXTURESAMPLER0 = D3DDMAPSAMPLER+1
|
---|
430 | Const D3DVERTEXTEXTURESAMPLER1 = D3DDMAPSAMPLER+2
|
---|
431 | Const D3DVERTEXTEXTURESAMPLER2 = D3DDMAPSAMPLER+3
|
---|
432 | Const D3DVERTEXTEXTURESAMPLER3 = D3DDMAPSAMPLER+4
|
---|
433 |
|
---|
434 | ' Values, used with D3DTSS_TEXCOORDINDEX, to specify that the vertex data(position
|
---|
435 | ' and normal in the camera space) should be taken as texture coordinates
|
---|
436 | ' Low 16 bits are used to specify texture coordinate index, to take the WRAP mode from
|
---|
437 | Const D3DTSS_TCI_PASSTHRU = &H00000000
|
---|
438 | Const D3DTSS_TCI_CAMERASPACENORMAL = &H00010000
|
---|
439 | Const D3DTSS_TCI_CAMERASPACEPOSITION = &H00020000
|
---|
440 | Const D3DTSS_TCI_CAMERASPACEREFLECTIONVECTOR = &H00030000
|
---|
441 | Const D3DTSS_TCI_SPHEREMAP = &H00040000
|
---|
442 |
|
---|
443 |
|
---|
444 | ' Enumerations for COLOROP and ALPHAOP texture blending operations set in
|
---|
445 | ' texture processing stage controls in D3DTSS.
|
---|
446 | Const Enum D3DTEXTUREOP
|
---|
447 | 'Control
|
---|
448 | D3DTOP_DISABLE = 1 'disables stage
|
---|
449 | D3DTOP_SELECTARG1 = 2 'the default
|
---|
450 | D3DTOP_SELECTARG2 = 3
|
---|
451 |
|
---|
452 | 'Modulate
|
---|
453 | D3DTOP_MODULATE = 4 'multiply args together
|
---|
454 | D3DTOP_MODULATE2X = 5 'multiply and 1 bit
|
---|
455 | D3DTOP_MODULATE4X = 6 'multiply and 2 bits
|
---|
456 |
|
---|
457 | 'Add
|
---|
458 | D3DTOP_ADD = 7 'add arguments together
|
---|
459 | D3DTOP_ADDSIGNED = 8 'add with -0.5 bias
|
---|
460 | D3DTOP_ADDSIGNED2X = 9 'as above but left 1 bit
|
---|
461 | D3DTOP_SUBTRACT = 10 'Arg1 - Arg2, with no saturation
|
---|
462 | D3DTOP_ADDSMOOTH = 11 'add 2 args, subtract product
|
---|
463 | 'Arg1 + Arg2 - Arg1*Arg2
|
---|
464 | '= Arg1 + (1-Arg1)*Arg2
|
---|
465 |
|
---|
466 | 'Linear alpha blend: Arg1*(Alpha) + Arg2*(1-Alpha)
|
---|
467 | D3DTOP_BLENDDIFFUSEALPHA = 12 'iterated alpha
|
---|
468 | D3DTOP_BLENDTEXTUREALPHA = 13 'texture alpha
|
---|
469 | D3DTOP_BLENDFACTORALPHA = 14 'alpha from D3DRS_TEXTUREFACTOR
|
---|
470 |
|
---|
471 | 'Linear alpha blend with pre-multiplied arg1 input: Arg1 + Arg2*(1-Alpha)
|
---|
472 | D3DTOP_BLENDTEXTUREALPHAPM = 15 'texture alpha
|
---|
473 | D3DTOP_BLENDCURRENTALPHA = 16 'by alpha of current color
|
---|
474 |
|
---|
475 | 'Specular mapping
|
---|
476 | D3DTOP_PREMODULATE = 17 'modulate with next texture before use
|
---|
477 | D3DTOP_MODULATEALPHA_ADDCOLOR = 18 'Arg1.RGB + Arg1.A*Arg2.RGB
|
---|
478 | 'COLOROP only
|
---|
479 | D3DTOP_MODULATECOLOR_ADDALPHA = 19 'Arg1.RGB*Arg2.RGB + Arg1.A
|
---|
480 | 'COLOROP only
|
---|
481 | D3DTOP_MODULATEINVALPHA_ADDCOLOR = 20 '(1-Arg1.A)*Arg2.RGB + Arg1.RGB
|
---|
482 | 'COLOROP only
|
---|
483 | D3DTOP_MODULATEINVCOLOR_ADDALPHA = 21 '(1-Arg1.RGB)*Arg2.RGB + Arg1.A
|
---|
484 | 'COLOROP only
|
---|
485 |
|
---|
486 | 'Bump mapping
|
---|
487 | D3DTOP_BUMPENVMAP = 22 'per pixel env map perturbation
|
---|
488 | D3DTOP_BUMPENVMAPLUMINANCE = 23 'with luminance channel
|
---|
489 |
|
---|
490 | 'This can do either diffuse or specular bump mapping with correct input.
|
---|
491 | 'Performs the function (Arg1.R*Arg2.R + Arg1.G*Arg2.G + Arg1.B*Arg2.B)
|
---|
492 | 'where each component has been scaled and offset to make it signed.
|
---|
493 | 'The result is replicated into all four (including alpha) channels.
|
---|
494 | 'This is a valid COLOROP only.
|
---|
495 | D3DTOP_DOTPRODUCT3 = 24
|
---|
496 |
|
---|
497 | 'Triadic ops
|
---|
498 | D3DTOP_MULTIPLYADD = 25 'Arg0 + Arg1*Arg2
|
---|
499 | D3DTOP_LERP = 26 '(Arg0)*Arg1 + (1-Arg0)*Arg2
|
---|
500 |
|
---|
501 | D3DTOP_FORCE_DWORD = &H7FFFFFFF
|
---|
502 | End Enum
|
---|
503 |
|
---|
504 |
|
---|
505 | ' Values for COLORARG0,1,2, ALPHAARG0,1,2, and RESULTARG texture blending
|
---|
506 | ' operations set in texture processing stage controls in D3DRENDERSTATE.
|
---|
507 | Const D3DTA_SELECTMASK = &H0000000f 'mask for arg selector
|
---|
508 | Const D3DTA_DIFFUSE = &H00000000 'select diffuse color (read only)
|
---|
509 | Const D3DTA_CURRENT = &H00000001 'select stage destination register (read/write)
|
---|
510 | Const D3DTA_TEXTURE = &H00000002 'select texture color (read only)
|
---|
511 | Const D3DTA_TFACTOR = &H00000003 'select D3DRS_TEXTUREFACTOR (read only)
|
---|
512 | Const D3DTA_SPECULAR = &H00000004 'select specular color (read only)
|
---|
513 | Const D3DTA_TEMP = &H00000005 'select temporary register color (read/write)
|
---|
514 | Const D3DTA_CONSTANT = &H00000006 'select texture stage constant
|
---|
515 | Const D3DTA_COMPLEMENT = &H00000010 'take 1.0 - x (read modifier)
|
---|
516 | Const D3DTA_ALPHAREPLICATE = &H00000020 'replicate alpha to color components (read modifier)
|
---|
517 |
|
---|
518 |
|
---|
519 | ' Values for D3DSAMP_***FILTER texture stage states
|
---|
520 | Const Enum D3DTEXTUREFILTERTYPE
|
---|
521 | D3DTEXF_NONE = 0 ' filtering disabled (valid for mip filter only)
|
---|
522 | D3DTEXF_POINT = 1 ' nearest
|
---|
523 | D3DTEXF_LINEAR = 2 ' linear interpolation
|
---|
524 | D3DTEXF_ANISOTROPIC = 3 ' anisotropic
|
---|
525 | D3DTEXF_PYRAMIDALQUAD = 6 ' 4-sample tent
|
---|
526 | D3DTEXF_GAUSSIANQUAD = 7 ' 4-sample gaussian
|
---|
527 | D3DTEXF_FORCE_DWORD = &H7FFFFFFF ' force 32-bit size enum
|
---|
528 | End Enum
|
---|
529 |
|
---|
530 | ' Bits for Flags in ProcessVertices call
|
---|
531 | Const D3DPV_DONOTCOPYDATA = 1<<0
|
---|
532 |
|
---|
533 |
|
---|
534 | 'Flexible vertex format bits
|
---|
535 | Const D3DFVF_RESERVED0 = &H001
|
---|
536 | Const D3DFVF_POSITION_MASK = &H400E
|
---|
537 | Const D3DFVF_XYZ = &H002
|
---|
538 | Const D3DFVF_XYZRHW = &H004
|
---|
539 | Const D3DFVF_XYZB1 = &H006
|
---|
540 | Const D3DFVF_XYZB2 = &H008
|
---|
541 | Const D3DFVF_XYZB3 = &H00a
|
---|
542 | Const D3DFVF_XYZB4 = &H00c
|
---|
543 | Const D3DFVF_XYZB5 = &H00e
|
---|
544 | Const D3DFVF_XYZW = &H4002
|
---|
545 |
|
---|
546 | Const D3DFVF_NORMAL = &H010
|
---|
547 | Const D3DFVF_PSIZE = &H020
|
---|
548 | Const D3DFVF_DIFFUSE = &H040
|
---|
549 | Const D3DFVF_SPECULAR = &H080
|
---|
550 |
|
---|
551 | Const D3DFVF_TEXCOUNT_MASK = &Hf00
|
---|
552 | Const D3DFVF_TEXCOUNT_SHIFT = &H8
|
---|
553 | Const D3DFVF_TEX0 = &H000
|
---|
554 | Const D3DFVF_TEX1 = &H100
|
---|
555 | Const D3DFVF_TEX2 = &H200
|
---|
556 | Const D3DFVF_TEX3 = &H300
|
---|
557 | Const D3DFVF_TEX4 = &H400
|
---|
558 | Const D3DFVF_TEX5 = &H500
|
---|
559 | Const D3DFVF_TEX6 = &H600
|
---|
560 | Const D3DFVF_TEX7 = &H700
|
---|
561 | Const D3DFVF_TEX8 = &H800
|
---|
562 |
|
---|
563 | Const D3DFVF_LASTBETA_UBYTE4 = &H1000
|
---|
564 | Const D3DFVF_LASTBETA_D3DCOLOR = &H8000
|
---|
565 |
|
---|
566 | Const D3DFVF_RESERVED2 = &H6000 '2 reserved bits
|
---|
567 |
|
---|
568 |
|
---|
569 | ' Vertex element semantics
|
---|
570 | Const Enum D3DDECLUSAGE
|
---|
571 | D3DDECLUSAGE_POSITION = 0
|
---|
572 | D3DDECLUSAGE_BLENDWEIGHT = 1
|
---|
573 | D3DDECLUSAGE_BLENDINDICES = 2
|
---|
574 | D3DDECLUSAGE_NORMAL = 3
|
---|
575 | D3DDECLUSAGE_PSIZE = 4
|
---|
576 | D3DDECLUSAGE_TEXCOORD = 5
|
---|
577 | D3DDECLUSAGE_TANGENT = 6
|
---|
578 | D3DDECLUSAGE_BINORMAL = 7
|
---|
579 | D3DDECLUSAGE_TESSFACTOR = 8
|
---|
580 | D3DDECLUSAGE_POSITIONT = 9
|
---|
581 | D3DDECLUSAGE_COLOR = 10
|
---|
582 | D3DDECLUSAGE_FOG = 11
|
---|
583 | D3DDECLUSAGE_DEPTH = 12
|
---|
584 | D3DDECLUSAGE_SAMPLE = 13
|
---|
585 | End Enum
|
---|
586 |
|
---|
587 | Const Enum D3DDECLMETHOD
|
---|
588 | D3DDECLMETHOD_DEFAULT = 0
|
---|
589 | D3DDECLMETHOD_PARTIALU = 1
|
---|
590 | D3DDECLMETHOD_PARTIALV = 2
|
---|
591 | D3DDECLMETHOD_CROSSUV = 3 'Normal
|
---|
592 | D3DDECLMETHOD_UV = 4
|
---|
593 | D3DDECLMETHOD_LOOKUP = 5 'Lookup a displacement map
|
---|
594 | D3DDECLMETHOD_LOOKUPPRESAMPLED = 6 'Lookup a pre-sampled displacement map
|
---|
595 | End Enum
|
---|
596 |
|
---|
597 | ' Declarations for _Type fields
|
---|
598 | Const Enum D3DDECLTYPE
|
---|
599 | D3DDECLTYPE_FLOAT1 = 0 '1D float expanded to (value, 0., 0., 1.)
|
---|
600 | D3DDECLTYPE_FLOAT2 = 1 '2D float expanded to (value, value, 0., 1.)
|
---|
601 | D3DDECLTYPE_FLOAT3 = 2 '3D float expanded to (value, value, value, 1.)
|
---|
602 | D3DDECLTYPE_FLOAT4 = 3 '4D float
|
---|
603 | D3DDECLTYPE_D3DCOLOR = 4 '4D packed unsigned bytes mapped to 0. to 1. range
|
---|
604 | 'Input is in D3DCOLOR format (ARGB) expanded to (R, G, B, A)
|
---|
605 | D3DDECLTYPE_UBYTE4 = 5 '4D unsigned byte
|
---|
606 | D3DDECLTYPE_SHORT2 = 6 '2D signed short expanded to (value, value, 0., 1.)
|
---|
607 | D3DDECLTYPE_SHORT4 = 7 '4D signed short
|
---|
608 |
|
---|
609 | 'The following types are valid only with vertex shaders >= 2.0
|
---|
610 | D3DDECLTYPE_UBYTE4N = 8 'Each of 4 bytes is normalized by dividing to 255.0
|
---|
611 | D3DDECLTYPE_SHORT2N = 9 '2D signed short normalized (v[0]/32767.0,v[1]/32767.0,0,1)
|
---|
612 | D3DDECLTYPE_SHORT4N = 10 '4D signed short normalized (v[0]/32767.0,v[1]/32767.0,v[2]/32767.0,v[3]/32767.0)
|
---|
613 | D3DDECLTYPE_USHORT2N = 11 '2D unsigned short normalized (v[0]/65535.0,v[1]/65535.0,0,1)
|
---|
614 | D3DDECLTYPE_USHORT4N = 12 '4D unsigned short normalized (v[0]/65535.0,v[1]/65535.0,v[2]/65535.0,v[3]/65535.0)
|
---|
615 | D3DDECLTYPE_UDEC3 = 13 '3D unsigned 10 10 10 format expanded to (value, value, value, 1)
|
---|
616 | D3DDECLTYPE_DEC3N = 14 '3D signed 10 10 10 format normalized and expanded to (v[0]/511.0, v[1]/511.0, v[2]/511.0, 1)
|
---|
617 | D3DDECLTYPE_FLOAT16_2 = 15 'Two 16-bit floating point values, expanded to (value, value, 0, 1)
|
---|
618 | D3DDECLTYPE_FLOAT16_4 = 16 'Four 16-bit floating point values
|
---|
619 | D3DDECLTYPE_UNUSED = 17 'When the type field in a decl is unused.
|
---|
620 | End Enum
|
---|
621 |
|
---|
622 | Type D3DVERTEXELEMENT9
|
---|
623 | Stream As Word
|
---|
624 | Offset As Word
|
---|
625 | byType As Byte
|
---|
626 | Method As Byte
|
---|
627 | Usage As Byte
|
---|
628 | UsageIndex As Byte
|
---|
629 | End Type
|
---|
630 |
|
---|
631 | ' Maximum supported number of texture coordinate sets
|
---|
632 | Const D3DDP_MAXTEXCOORD = 8
|
---|
633 |
|
---|
634 |
|
---|
635 | ' Values for IDirect3DDevice9::SetStreamSourceFreq's Setting parameter
|
---|
636 | Const D3DSTREAMSOURCE_INDEXEDDATA = 1<<30
|
---|
637 | Const D3DSTREAMSOURCE_INSTANCEDATA = 2<<30
|
---|
638 |
|
---|
639 | Const D3DSP_TEXTURETYPE_SHIFT = 27
|
---|
640 | Const Enum D3DSAMPLER_TEXTURE_TYPE
|
---|
641 | D3DSTT_UNKNOWN = 0<<D3DSP_TEXTURETYPE_SHIFT 'uninitialized value
|
---|
642 | D3DSTT_2D = 2<<D3DSP_TEXTURETYPE_SHIFT 'dcl_2d s# (for declaring a 2-D texture)
|
---|
643 | D3DSTT_CUBE = 3<<D3DSP_TEXTURETYPE_SHIFT 'dcl_cube s# (for declaring a cube texture)
|
---|
644 | D3DSTT_VOLUME = 4<<D3DSP_TEXTURETYPE_SHIFT 'dcl_volume s# (for declaring a volume texture)
|
---|
645 | D3DSTT_FORCE_DWORD = &H7FFFFFFF
|
---|
646 | End Enum
|
---|
647 |
|
---|
648 |
|
---|
649 | ' pixel shader version token
|
---|
650 | Const D3DPS_VERSION(_Major,_Minor) = &HFFFF0000 or (_Major<<8) or _Minor
|
---|
651 |
|
---|
652 | ' vertex shader version token
|
---|
653 | Const D3DVS_VERSION(_Major,_Minor) = &HFFFE0000 or (_Major<<8) or _Minor
|
---|
654 |
|
---|
655 |
|
---|
656 |
|
---|
657 | ' High order surfaces
|
---|
658 | Const Enum D3DBASISTYPE
|
---|
659 | D3DBASIS_BEZIER = 0
|
---|
660 | D3DBASIS_BSPLINE = 1
|
---|
661 | D3DBASIS_CATMULL_ROM = 2 ' In D3D8 this used to be D3DBASIS_INTERPOLATE
|
---|
662 | D3DBASIS_FORCE_DWORD = &H7FFFFFFF
|
---|
663 | End Enum
|
---|
664 |
|
---|
665 | Const Enum D3DDEGREETYPE
|
---|
666 | D3DDEGREE_LINEAR = 1
|
---|
667 | D3DDEGREE_QUADRATIC = 2
|
---|
668 | D3DDEGREE_CUBIC = 3
|
---|
669 | D3DDEGREE_QUINTIC = 5
|
---|
670 | D3DDEGREE_FORCE_DWORD = &H7FFFFFFF
|
---|
671 | End Enum
|
---|
672 |
|
---|
673 | Const Enum D3DPATCHEDGESTYLE
|
---|
674 | D3DPATCHEDGE_DISCRETE = 0
|
---|
675 | D3DPATCHEDGE_CONTINUOUS = 1
|
---|
676 | D3DPATCHEDGE_FORCE_DWORD = &H7FFFFFFF
|
---|
677 | End Enum
|
---|
678 |
|
---|
679 | Const Enum D3DSTATEBLOCKTYPE
|
---|
680 | D3DSBT_ALL = 1 'capture all state
|
---|
681 | D3DSBT_PIXELSTATE = 2 'capture pixel state
|
---|
682 | D3DSBT_VERTEXSTATE = 3 'capture vertex state
|
---|
683 | D3DSBT_FORCE_DWORD = &H7FFFFFFF
|
---|
684 | End Enum
|
---|
685 |
|
---|
686 | ' The D3DVERTEXBLENDFLAGS type is used with D3DRS_VERTEXBLEND state.
|
---|
687 | Const Enum D3DVERTEXBLENDFLAGS
|
---|
688 | D3DVBF_DISABLE = 0 'Disable vertex blending
|
---|
689 | D3DVBF_1WEIGHTS = 1 '2 matrix blending
|
---|
690 | D3DVBF_2WEIGHTS = 2 '3 matrix blending
|
---|
691 | D3DVBF_3WEIGHTS = 3 '4 matrix blending
|
---|
692 | D3DVBF_TWEENING = 255 'blending using D3DRS_TWEENFACTOR
|
---|
693 | D3DVBF_0WEIGHTS = 256 'one matrix is used with weight 1.0
|
---|
694 | D3DVBF_FORCE_DWORD = &H7FFFFFFF
|
---|
695 | End Enum
|
---|
696 |
|
---|
697 | Const Enum D3DTEXTURETRANSFORMFLAGS
|
---|
698 | D3DTTFF_DISABLE = 0 'texture coordinates are passed directly
|
---|
699 | D3DTTFF_COUNT1 = 1 'rasterizer should expect 1-D texture coords
|
---|
700 | D3DTTFF_COUNT2 = 2 'rasterizer should expect 2-D texture coords
|
---|
701 | D3DTTFF_COUNT3 = 3 'rasterizer should expect 3-D texture coords
|
---|
702 | D3DTTFF_COUNT4 = 4 'rasterizer should expect 4-D texture coords
|
---|
703 | D3DTTFF_PROJECTED = 256 'texcoords to be divided by COUNTth element
|
---|
704 | D3DTTFF_FORCE_DWORD = &H7FFFFFFF
|
---|
705 | End Enum
|
---|
706 |
|
---|
707 | ' Macros to set texture coordinate format bits in the FVF id
|
---|
708 | Const D3DFVF_TEXTUREFORMAT2 = 0 'Two floating point values
|
---|
709 | Const D3DFVF_TEXTUREFORMAT1 = 3 'One floating point value
|
---|
710 | Const D3DFVF_TEXTUREFORMAT3 = 1 'Three floating point values
|
---|
711 | Const D3DFVF_TEXTUREFORMAT4 = 2 'Four floating point values
|
---|
712 |
|
---|
713 | Const D3DFVF_TEXCOORDSIZE3(CoordIndex) = D3DFVF_TEXTUREFORMAT3 << (CoordIndex*2 + 16)
|
---|
714 | Const D3DFVF_TEXCOORDSIZE2(CoordIndex) = D3DFVF_TEXTUREFORMAT2
|
---|
715 | Const D3DFVF_TEXCOORDSIZE4(CoordIndex) = D3DFVF_TEXTUREFORMAT4 << (CoordIndex*2 + 16)
|
---|
716 | Const D3DFVF_TEXCOORDSIZE1(CoordIndex) = D3DFVF_TEXTUREFORMAT1 << (CoordIndex*2 + 16)
|
---|
717 |
|
---|
718 |
|
---|
719 | ' Direct3D9 Device types
|
---|
720 | Const Enum D3DDEVTYPE
|
---|
721 | D3DDEVTYPE_HAL = 1
|
---|
722 | D3DDEVTYPE_REF = 2
|
---|
723 | D3DDEVTYPE_SW = 3
|
---|
724 |
|
---|
725 | D3DDEVTYPE_NULLREF = 4
|
---|
726 |
|
---|
727 | D3DDEVTYPE_FORCE_DWORD = &H7FFFFFFF
|
---|
728 | End Enum
|
---|
729 |
|
---|
730 |
|
---|
731 | ' Multi-Sample buffer types
|
---|
732 | Const Enum D3DMULTISAMPLE_TYPE
|
---|
733 | D3DMULTISAMPLE_NONE = 0
|
---|
734 | D3DMULTISAMPLE_NONMASKABLE = 1
|
---|
735 | D3DMULTISAMPLE_2_SAMPLES = 2
|
---|
736 | D3DMULTISAMPLE_3_SAMPLES = 3
|
---|
737 | D3DMULTISAMPLE_4_SAMPLES = 4
|
---|
738 | D3DMULTISAMPLE_5_SAMPLES = 5
|
---|
739 | D3DMULTISAMPLE_6_SAMPLES = 6
|
---|
740 | D3DMULTISAMPLE_7_SAMPLES = 7
|
---|
741 | D3DMULTISAMPLE_8_SAMPLES = 8
|
---|
742 | D3DMULTISAMPLE_9_SAMPLES = 9
|
---|
743 | D3DMULTISAMPLE_10_SAMPLES = 10
|
---|
744 | D3DMULTISAMPLE_11_SAMPLES = 11
|
---|
745 | D3DMULTISAMPLE_12_SAMPLES = 12
|
---|
746 | D3DMULTISAMPLE_13_SAMPLES = 13
|
---|
747 | D3DMULTISAMPLE_14_SAMPLES = 14
|
---|
748 | D3DMULTISAMPLE_15_SAMPLES = 15
|
---|
749 | D3DMULTISAMPLE_16_SAMPLES = 16
|
---|
750 |
|
---|
751 | D3DMULTISAMPLE_FORCE_DWORD = &H7FFFFFFF
|
---|
752 | End Enum
|
---|
753 |
|
---|
754 | Const Enum D3DFORMAT
|
---|
755 | D3DFMT_UNKNOWN = 0
|
---|
756 |
|
---|
757 | D3DFMT_R8G8B8 = 20
|
---|
758 | D3DFMT_A8R8G8B8 = 21
|
---|
759 | D3DFMT_X8R8G8B8 = 22
|
---|
760 | D3DFMT_R5G6B5 = 23
|
---|
761 | D3DFMT_X1R5G5B5 = 24
|
---|
762 | D3DFMT_A1R5G5B5 = 25
|
---|
763 | D3DFMT_A4R4G4B4 = 26
|
---|
764 | D3DFMT_R3G3B2 = 27
|
---|
765 | D3DFMT_A8 = 28
|
---|
766 | D3DFMT_A8R3G3B2 = 29
|
---|
767 | D3DFMT_X4R4G4B4 = 30
|
---|
768 | D3DFMT_A2B10G10R10 = 31
|
---|
769 | D3DFMT_A8B8G8R8 = 32
|
---|
770 | D3DFMT_X8B8G8R8 = 33
|
---|
771 | D3DFMT_G16R16 = 34
|
---|
772 | D3DFMT_A2R10G10B10 = 35
|
---|
773 | D3DFMT_A16B16G16R16 = 36
|
---|
774 |
|
---|
775 | D3DFMT_A8P8 = 40
|
---|
776 | D3DFMT_P8 = 41
|
---|
777 |
|
---|
778 | D3DFMT_L8 = 50
|
---|
779 | D3DFMT_A8L8 = 51
|
---|
780 | D3DFMT_A4L4 = 52
|
---|
781 |
|
---|
782 | D3DFMT_V8U8 = 60
|
---|
783 | D3DFMT_L6V5U5 = 61
|
---|
784 | D3DFMT_X8L8V8U8 = 62
|
---|
785 | D3DFMT_Q8W8V8U8 = 63
|
---|
786 | D3DFMT_V16U16 = 64
|
---|
787 | D3DFMT_A2W10V10U10 = 67
|
---|
788 |
|
---|
789 | D3DFMT_UYVY = &H59565955 'MAKEFOURCC('U', 'Y', 'V', 'Y'),
|
---|
790 | D3DFMT_R8G8_B8G8 = &H47424752 'MAKEFOURCC('R', 'G', 'B', 'G'),
|
---|
791 | D3DFMT_YUY2 = &H32595559 'MAKEFOURCC('Y', 'U', 'Y', '2'),
|
---|
792 | D3DFMT_G8R8_G8B8 = &H42475247 'MAKEFOURCC('G', 'R', 'G', 'B'),
|
---|
793 | D3DFMT_DXT1 = &H31545844 'MAKEFOURCC('D', 'X', 'T', '1'),
|
---|
794 | D3DFMT_DXT2 = &H32545844 'MAKEFOURCC('D', 'X', 'T', '2'),
|
---|
795 | D3DFMT_DXT3 = &H33545844 'MAKEFOURCC('D', 'X', 'T', '3'),
|
---|
796 | D3DFMT_DXT4 = &H34545844 'MAKEFOURCC('D', 'X', 'T', '4'),
|
---|
797 | D3DFMT_DXT5 = &H35545844 'MAKEFOURCC('D', 'X', 'T', '5'),
|
---|
798 |
|
---|
799 | D3DFMT_D16_LOCKABLE = 70
|
---|
800 | D3DFMT_D32 = 71
|
---|
801 | D3DFMT_D15S1 = 73
|
---|
802 | D3DFMT_D24S8 = 75
|
---|
803 | D3DFMT_D24X8 = 77
|
---|
804 | D3DFMT_D24X4S4 = 79
|
---|
805 | D3DFMT_D16 = 80
|
---|
806 |
|
---|
807 | D3DFMT_D32F_LOCKABLE = 82
|
---|
808 | D3DFMT_D24FS8 = 83
|
---|
809 |
|
---|
810 |
|
---|
811 | D3DFMT_L16 = 81
|
---|
812 |
|
---|
813 | D3DFMT_VERTEXDATA =100
|
---|
814 | D3DFMT_INDEX16 =101
|
---|
815 | D3DFMT_INDEX32 =102
|
---|
816 |
|
---|
817 | D3DFMT_Q16W16V16U16 =110
|
---|
818 |
|
---|
819 | D3DFMT_MULTI2_ARGB8 = &H3154454D 'MAKEFOURCC('M','E','T','1')
|
---|
820 |
|
---|
821 | ' Floating point surface formats
|
---|
822 |
|
---|
823 | ' s10e5 formats (16-bits per channel)
|
---|
824 | D3DFMT_R16F = 111
|
---|
825 | D3DFMT_G16R16F = 112
|
---|
826 | D3DFMT_A16B16G16R16F = 113
|
---|
827 |
|
---|
828 | ' IEEE s23e8 formats (32-bits per channel)
|
---|
829 | D3DFMT_R32F = 114
|
---|
830 | D3DFMT_G32R32F = 115
|
---|
831 | D3DFMT_A32B32G32R32F = 116
|
---|
832 |
|
---|
833 | D3DFMT_CxV8U8 = 117
|
---|
834 |
|
---|
835 |
|
---|
836 | D3DFMT_FORCE_DWORD = &H7FFFFFFF
|
---|
837 | End Enum
|
---|
838 |
|
---|
839 | Type D3DDISPLAYMODE
|
---|
840 | Width As DWord
|
---|
841 | Height As DWord
|
---|
842 | RefreshRate As DWord
|
---|
843 | Format As D3DFORMAT
|
---|
844 | End Type
|
---|
845 |
|
---|
846 | ' Creation Parameters
|
---|
847 | Type D3DDEVICE_CREATION_PARAMETERS
|
---|
848 | AdapterOrdinal As DWord
|
---|
849 | DeviceType As DWord
|
---|
850 | hFocusWindow As DWord
|
---|
851 | BehaviorFlags As DWord
|
---|
852 | End Type
|
---|
853 |
|
---|
854 | ' SwapEffects
|
---|
855 | Const Enum D3DSWAPEFFECT
|
---|
856 | D3DSWAPEFFECT_DISCARD = 1
|
---|
857 | D3DSWAPEFFECT_FLIP = 2
|
---|
858 | D3DSWAPEFFECT_COPY = 3
|
---|
859 |
|
---|
860 | D3DSWAPEFFECT_FORCE_DWORD = &H7FFFFFFF
|
---|
861 | End Enum
|
---|
862 |
|
---|
863 | ' Pool types
|
---|
864 | Const Enum D3DPOOL
|
---|
865 | D3DPOOL_DEFAULT = 0
|
---|
866 | D3DPOOL_MANAGED = 1
|
---|
867 | D3DPOOL_SYSTEMMEM = 2
|
---|
868 | D3DPOOL_SCRATCH = 3
|
---|
869 |
|
---|
870 | D3DPOOL_FORCE_DWORD = &H7FFFFFFF
|
---|
871 | End Enum
|
---|
872 |
|
---|
873 | 'RefreshRate pre-defines
|
---|
874 | Const D3DPRESENT_RATE_DEFAULT = &H00000000
|
---|
875 |
|
---|
876 | ' Resize Optional Parameters
|
---|
877 | Type D3DPRESENT_PARAMETERS
|
---|
878 | BackBufferWidth As DWord
|
---|
879 | BackBufferHeight As DWord
|
---|
880 | BackBufferFormat As D3DFORMAT
|
---|
881 | BackBufferCount As DWord
|
---|
882 |
|
---|
883 | MultiSampleType As D3DMULTISAMPLE_TYPE
|
---|
884 | MultiSampleQuality As DWord
|
---|
885 |
|
---|
886 | SwapEffect As D3DSWAPEFFECT
|
---|
887 | hDeviceWindow As HWND
|
---|
888 | Windowed As Long
|
---|
889 | EnableAutoDepthStencil As Long
|
---|
890 | AutoDepthStencilFormat As D3DFORMAT
|
---|
891 | Flags As DWord
|
---|
892 |
|
---|
893 | 'FullScreen_RefreshRateInHz must be zero for Windowed mode
|
---|
894 | FullScreen_RefreshRateInHz As DWord
|
---|
895 | PresentationInterval As DWord
|
---|
896 | End Type
|
---|
897 |
|
---|
898 | ' Values for D3DPRESENT_PARAMETERS.Flags
|
---|
899 | Const D3DPRESENTFLAG_LOCKABLE_BACKBUFFER = &H00000001
|
---|
900 | Const D3DPRESENTFLAG_DISCARD_DEPTHSTENCIL = &H00000002
|
---|
901 | Const D3DPRESENTFLAG_DEVICECLIP = &H00000004
|
---|
902 | Const D3DPRESENTFLAG_VIDEO = &H00000010
|
---|
903 |
|
---|
904 | ' Gamma Ramp: Same as DX7
|
---|
905 | Type D3DGAMMARAMP
|
---|
906 | red[255] As Word
|
---|
907 | green[255] As Word
|
---|
908 | blue[255] As Word
|
---|
909 | End Type
|
---|
910 |
|
---|
911 | ' Back buffer types
|
---|
912 | Const Enum D3DBACKBUFFER_TYPE
|
---|
913 | D3DBACKBUFFER_TYPE_MONO = 0
|
---|
914 | D3DBACKBUFFER_TYPE_LEFT = 1
|
---|
915 | D3DBACKBUFFER_TYPE_RIGHT = 2
|
---|
916 |
|
---|
917 | D3DBACKBUFFER_TYPE_FORCE_DWORD = &H7FFFFFFF
|
---|
918 | End Enum
|
---|
919 |
|
---|
920 | Const Enum D3DRESOURCETYPE
|
---|
921 | D3DRTYPE_SURFACE = 1
|
---|
922 | D3DRTYPE_VOLUME = 2
|
---|
923 | D3DRTYPE_TEXTURE = 3
|
---|
924 | D3DRTYPE_VOLUMETEXTURE = 4
|
---|
925 | D3DRTYPE_CUBETEXTURE = 5
|
---|
926 | D3DRTYPE_VERTEXBUFFER = 6
|
---|
927 | D3DRTYPE_INDEXBUFFER = 7
|
---|
928 |
|
---|
929 | D3DRTYPE_FORCE_DWORD = &H7FFFFFFF
|
---|
930 | End Enum
|
---|
931 |
|
---|
932 | ' Usages
|
---|
933 | Const D3DUSAGE_RENDERTARGET = &H00000001
|
---|
934 | Const D3DUSAGE_DEPTHSTENCIL = &H00000002
|
---|
935 | Const D3DUSAGE_DYNAMIC = &H00000200
|
---|
936 |
|
---|
937 | ' When passed to CheckDeviceFormat, D3DUSAGE_AUTOGENMIPMAP may return
|
---|
938 | ' D3DOK_NOAUTOGEN if the device doesn't support autogeneration for that format.
|
---|
939 | ' D3DOK_NOAUTOGEN is a success code, not a failure code... the SUCCEEDED and FAILED macros
|
---|
940 | ' will return true and false respectively for this code.
|
---|
941 | Const D3DUSAGE_AUTOGENMIPMAP = &H00000400
|
---|
942 | Const D3DUSAGE_DMAP = &H00004000
|
---|
943 |
|
---|
944 | ' The following usages are valid only for querying CheckDeviceFormat
|
---|
945 | Const D3DUSAGE_QUERY_LEGACYBUMPMAP = &H00008000
|
---|
946 | Const D3DUSAGE_QUERY_SRGBREAD = &H00010000
|
---|
947 | Const D3DUSAGE_QUERY_FILTER = &H00020000
|
---|
948 | Const D3DUSAGE_QUERY_SRGBWRITE = &H00040000
|
---|
949 | Const D3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING = &H00080000
|
---|
950 | Const D3DUSAGE_QUERY_VERTEXTEXTURE = &H00100000
|
---|
951 | Const D3DUSAGE_QUERY_WRAPANDMIP = &H00200000
|
---|
952 |
|
---|
953 | ' Usages for Vertex/Index buffers
|
---|
954 | Const D3DUSAGE_WRITEONLY = &H00000008
|
---|
955 | Const D3DUSAGE_SOFTWAREPROCESSING = &H00000010
|
---|
956 | Const D3DUSAGE_DONOTCLIP = &H00000020
|
---|
957 | Const D3DUSAGE_POINTS = &H00000040
|
---|
958 | Const D3DUSAGE_RTPATCHES = &H00000080
|
---|
959 | Const D3DUSAGE_NPATCHES = &H00000100
|
---|
960 |
|
---|
961 |
|
---|
962 |
|
---|
963 | ' CubeMap Face identifiers
|
---|
964 | Const Enum D3DCUBEMAP_FACES
|
---|
965 | D3DCUBEMAP_FACE_POSITIVE_X = 0
|
---|
966 | D3DCUBEMAP_FACE_NEGATIVE_X = 1
|
---|
967 | D3DCUBEMAP_FACE_POSITIVE_Y = 2
|
---|
968 | D3DCUBEMAP_FACE_NEGATIVE_Y = 3
|
---|
969 | D3DCUBEMAP_FACE_POSITIVE_Z = 4
|
---|
970 | D3DCUBEMAP_FACE_NEGATIVE_Z = 5
|
---|
971 |
|
---|
972 | D3DCUBEMAP_FACE_FORCE_DWORD = &H7FFFFFFF
|
---|
973 | End Enum
|
---|
974 |
|
---|
975 | ' Lock flags
|
---|
976 | Const D3DLOCK_READONLY = &H00000010
|
---|
977 | Const D3DLOCK_DISCARD = &H00002000
|
---|
978 | Const D3DLOCK_NOOVERWRITE = &H00001000
|
---|
979 | Const D3DLOCK_NOSYSLOCK = &H00000800
|
---|
980 | Const D3DLOCK_DONOTWAIT = &H00004000
|
---|
981 | Const D3DLOCK_NO_DIRTY_UPDATE = &H00008000
|
---|
982 |
|
---|
983 |
|
---|
984 |
|
---|
985 | ' Vertex Buffer Description
|
---|
986 | Type D3DVERTEXBUFFER_DESC
|
---|
987 | Format As D3DFORMAT
|
---|
988 | SourceType As D3DRESOURCETYPE
|
---|
989 | Usage As DWord
|
---|
990 | Pool As D3DPOOL
|
---|
991 | Size As DWord
|
---|
992 |
|
---|
993 | FVF As DWord
|
---|
994 | End Type
|
---|
995 |
|
---|
996 | ' Index Buffer Description
|
---|
997 | Type D3DINDEXBUFFER_DESC
|
---|
998 | Format As D3DFORMAT
|
---|
999 | SourceType As D3DRESOURCETYPE
|
---|
1000 | Usage As DWord
|
---|
1001 | Pool As D3DPOOL
|
---|
1002 | Size As DWord
|
---|
1003 | End Type
|
---|
1004 |
|
---|
1005 |
|
---|
1006 | ' Surface Description
|
---|
1007 | Type D3DSURFACE_DESC
|
---|
1008 | Format As D3DFORMAT
|
---|
1009 | SourceType As D3DRESOURCETYPE
|
---|
1010 | Usage As DWord
|
---|
1011 | Pool As D3DPOOL
|
---|
1012 | MultiSampleType As D3DMULTISAMPLE_TYPE
|
---|
1013 | MultiSampleQuality As DWord
|
---|
1014 | Width As DWord
|
---|
1015 | Height As DWord
|
---|
1016 | End Type
|
---|
1017 |
|
---|
1018 |
|
---|
1019 | Type D3DVOLUME_DESC
|
---|
1020 | Format As D3DFORMAT
|
---|
1021 | SourceType As D3DRESOURCETYPE
|
---|
1022 | Usage As DWord
|
---|
1023 | Pool As D3DPOOL
|
---|
1024 | Width As DWord
|
---|
1025 | Height As DWord
|
---|
1026 | Depth As DWord
|
---|
1027 | End Type
|
---|
1028 |
|
---|
1029 | ' Structure for LockRect
|
---|
1030 | Type D3DLOCKED_RECT
|
---|
1031 | Pitch As Long
|
---|
1032 | pBits As VoidPtr
|
---|
1033 | End Type
|
---|
1034 |
|
---|
1035 | 'Structures for LockBox
|
---|
1036 | Type D3DBOX
|
---|
1037 | Left As DWord
|
---|
1038 | Top As DWord
|
---|
1039 | Right As DWord
|
---|
1040 | Bottom As DWord
|
---|
1041 | Front As DWord
|
---|
1042 | Back As DWord
|
---|
1043 | End Type
|
---|
1044 |
|
---|
1045 | Type D3DLOCKED_BOX
|
---|
1046 | RowPitch As Long
|
---|
1047 | SlicePitch As Long
|
---|
1048 | pBits As VoidPtr
|
---|
1049 | End Type
|
---|
1050 |
|
---|
1051 | ' Structures for LockRange
|
---|
1052 | Type D3DRANGE
|
---|
1053 | Offset As DWord
|
---|
1054 | Size As DWord
|
---|
1055 | End Type
|
---|
1056 |
|
---|
1057 | ' Structures for high order primitives
|
---|
1058 | Type D3DRECTPATCH_INFO
|
---|
1059 | StartVertexOffsetWidth As DWord
|
---|
1060 | StartVertexOffsetHeight As DWord
|
---|
1061 | Width As DWord
|
---|
1062 | Height As DWord
|
---|
1063 | Stride As DWord
|
---|
1064 | Basis As D3DBASISTYPE
|
---|
1065 | Degree As D3DDEGREETYPE
|
---|
1066 | End Type
|
---|
1067 | Type D3DTRIPATCH_INFO
|
---|
1068 | StartVertexOffset As DWord
|
---|
1069 | NumVertices As DWord
|
---|
1070 | Basis As D3DBASISTYPE
|
---|
1071 | Degree As D3DDEGREETYPE
|
---|
1072 | End Type
|
---|
1073 |
|
---|
1074 |
|
---|
1075 | ' Adapter Identifier
|
---|
1076 | Const MAX_DEVICE_IDENTIFIER_STRING = 512
|
---|
1077 | Type D3DADAPTER_IDENTIFIER9
|
---|
1078 | Driver[MAX_DEVICE_IDENTIFIER_STRING-1] As Byte
|
---|
1079 | Description[MAX_DEVICE_IDENTIFIER_STRING-1] As Byte
|
---|
1080 | DeviceName[31] As Byte
|
---|
1081 |
|
---|
1082 | DriverVersionLowPart As DWord
|
---|
1083 | DriverVersionHighPart As DWord
|
---|
1084 |
|
---|
1085 | VendorId As DWord
|
---|
1086 | DeviceId As DWord
|
---|
1087 | SubSysId As DWord
|
---|
1088 | Revision As DWord
|
---|
1089 |
|
---|
1090 | DeviceIdentifier As GUID
|
---|
1091 |
|
---|
1092 | WHQLLevel As DWord
|
---|
1093 | End Type
|
---|
1094 |
|
---|
1095 | ' Raster Status structure returned by GetRasterStatus
|
---|
1096 | Type D3DRASTER_STATUS
|
---|
1097 | InVBlank As Long
|
---|
1098 | ScanLine As DWord
|
---|
1099 | End Type
|
---|
1100 |
|
---|
1101 |
|
---|
1102 | Const Enum D3DDEBUGMONITORTOKENS
|
---|
1103 | D3DDMT_ENABLE = 0 'enable debug monitor
|
---|
1104 | D3DDMT_DISABLE = 1 'disable debug monitor
|
---|
1105 | D3DDMT_FORCE_DWORD = &H7FFFFFFF
|
---|
1106 | End Enum
|
---|
1107 |
|
---|
1108 |
|
---|
1109 | 'Async feedback
|
---|
1110 | Const Enum D3DQUERYTYPE
|
---|
1111 | D3DQUERYTYPE_VCACHE = 4 'D3DISSUE_END
|
---|
1112 | D3DQUERYTYPE_RESOURCEMANAGER = 5 'D3DISSUE_END
|
---|
1113 | D3DQUERYTYPE_VERTEXSTATS = 6 'D3DISSUE_END
|
---|
1114 | D3DQUERYTYPE_EVENT = 8 'D3DISSUE_END
|
---|
1115 | D3DQUERYTYPE_OCCLUSION = 9 'D3DISSUE_BEGIN, D3DISSUE_END
|
---|
1116 | D3DQUERYTYPE_TIMESTAMP = 10 'D3DISSUE_END
|
---|
1117 | D3DQUERYTYPE_TIMESTAMPDISJOINT = 11 'D3DISSUE_BEGIN, D3DISSUE_END
|
---|
1118 | D3DQUERYTYPE_TIMESTAMPFREQ = 12 'D3DISSUE_END
|
---|
1119 | D3DQUERYTYPE_PIPELINETIMINGS = 13 'D3DISSUE_BEGIN, D3DISSUE_END
|
---|
1120 | D3DQUERYTYPE_INTERFACETIMINGS = 14 'D3DISSUE_BEGIN, D3DISSUE_END
|
---|
1121 | D3DQUERYTYPE_VERTEXTIMINGS = 15 'D3DISSUE_BEGIN, D3DISSUE_END
|
---|
1122 | D3DQUERYTYPE_PIXELTIMINGS = 16 'D3DISSUE_BEGIN, D3DISSUE_END
|
---|
1123 | D3DQUERYTYPE_BANDWIDTHTIMINGS = 17 'D3DISSUE_BEGIN, D3DISSUE_END
|
---|
1124 | D3DQUERYTYPE_CACHEUTILIZATION = 18 'D3DISSUE_BEGIN, D3DISSUE_END
|
---|
1125 | End Enum
|
---|
1126 |
|
---|
1127 | ' Flags field for Issue
|
---|
1128 | Const D3DISSUE_END = 1<<0 'Tells the runtime to issue the end of a query, changing it's state to "non-signaled".
|
---|
1129 | Const D3DISSUE_BEGIN = 1<<1 'Tells the runtime to issue the beginng of a query.
|
---|
1130 |
|
---|
1131 | ' Flags field for GetData
|
---|
1132 | Const D3DGETDATA_FLUSH = 1<<0 'Tells the runtime to flush if the query is outstanding.
|
---|
1133 |
|
---|
1134 |
|
---|
1135 | Type D3DRESOURCESTATS
|
---|
1136 | 'Data collected since last Present()
|
---|
1137 | bThrashing As Long 'indicates if thrashing
|
---|
1138 | ApproxBytesDownloaded As DWord 'Approximate number of bytes downloaded by resource manager
|
---|
1139 | NumEvicts As DWord 'number of objects evicted
|
---|
1140 | NumVidCreates As DWord 'number of objects created in video memory
|
---|
1141 | LastPri As DWord 'priority of last object evicted
|
---|
1142 | NumUsed As DWord 'number of objects set to the device
|
---|
1143 | NumUsedInVidMem As DWord 'number of objects set to the device, which are already in video memory
|
---|
1144 | 'Persistent data
|
---|
1145 | WorkingSet As DWord 'number of objects in video memory
|
---|
1146 | WorkingSetBytes As DWord 'number of bytes in video memory
|
---|
1147 | TotalManaged As DWord 'total number of managed objects
|
---|
1148 | TotalBytes As DWord 'total number of bytes of managed objects
|
---|
1149 | End Type
|
---|
1150 |
|
---|
1151 | Const D3DRTYPECOUNT = 8
|
---|
1152 |
|
---|
1153 | Type D3DDEVINFO_RESOURCEMANAGER
|
---|
1154 | stats[D3DRTYPECOUNT-1] As D3DRESOURCESTATS
|
---|
1155 | End Type
|
---|
1156 |
|
---|
1157 | Type D3DDEVINFO_D3DVERTEXSTATS
|
---|
1158 | NumRenderedTriangles As DWord 'total number of triangles that are not clipped in this frame
|
---|
1159 | NumExtraClippingTriangles As DWord 'Number of new triangles generated by clipping
|
---|
1160 | End Type
|
---|
1161 |
|
---|
1162 | Type D3DDEVINFO_VCACHE
|
---|
1163 | Pattern As DWord
|
---|
1164 | OptMethod As DWord
|
---|
1165 | CacheSize As DWord
|
---|
1166 | MagicNumber As DWord
|
---|
1167 | End Type
|
---|
1168 |
|
---|
1169 | Type D3DDEVINFO_D3D9PIPELINETIMINGS
|
---|
1170 | VertexProcessingTimePercent As Single
|
---|
1171 | PixelProcessingTimePercent As Single
|
---|
1172 | OtherGPUProcessingTimePercent As Single
|
---|
1173 | GPUIdleTimePercent As Single
|
---|
1174 | End Type
|
---|
1175 |
|
---|
1176 | Type D3DDEVINFO_D3D9INTERFACETIMINGS
|
---|
1177 | WaitingForGPUToUseApplicationResourceTimePercent As Single
|
---|
1178 | WaitingForGPUToAcceptMoreCommandsTimePercent As Single
|
---|
1179 | WaitingForGPUToStayWithinLatencyTimePercent As Single
|
---|
1180 | WaitingForGPUExclusiveResourceTimePercent As Single
|
---|
1181 | WaitingForGPUOtherTimePercent As Single
|
---|
1182 | End Type
|
---|
1183 |
|
---|
1184 | Type D3DDEVINFO_D3D9STAGETIMINGS
|
---|
1185 | MemoryProcessingPercent As Single
|
---|
1186 | ComputationProcessingPercent As Single
|
---|
1187 | End Type
|
---|
1188 |
|
---|
1189 | Type D3DDEVINFO_D3D9BANDWIDTHTIMINGS
|
---|
1190 | MaxBandwidthUtilized As Single
|
---|
1191 | FrontEndUploadMemoryUtilizedPercent As Single
|
---|
1192 | VertexRateUtilizedPercent As Single
|
---|
1193 | TriangleSetupRateUtilizedPercent As Single
|
---|
1194 | FillRateUtilizedPercent As Single
|
---|
1195 | End Type
|
---|
1196 |
|
---|
1197 | Type D3DDEVINFO_D3D9CACHEUTILIZATION
|
---|
1198 | TextureCacheHitRate As Single
|
---|
1199 | PostTransformVertexCacheHitRate As Single
|
---|
1200 | End Type
|
---|