mshtml: Properly handle fragment-only navigation.
[wine] / include / d3dx9mesh.h
1 /*
2  * Copyright (C) 2009 David Adam
3  * Copyright (C) 2010 Tony Wasserka
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
18  */
19
20 #include <d3dx9.h>
21
22 #ifndef __WINE_D3DX9MESH_H
23 #define __WINE_D3DX9MESH_H
24
25 DEFINE_GUID(IID_ID3DXBaseMesh, 0x7ed943dd, 0x52e8, 0x40b5, 0xa8, 0xd8, 0x76, 0x68, 0x5c, 0x40, 0x63, 0x30);
26 DEFINE_GUID(IID_ID3DXMesh,     0x4020e5c2, 0x1403, 0x4929, 0x88, 0x3f, 0xe2, 0xe8, 0x49, 0xfa, 0xc1, 0x95);
27 DEFINE_GUID(IID_ID3DXPMesh,    0x8875769a, 0xd579, 0x4088, 0xaa, 0xeb, 0x53, 0x4d, 0x1a, 0xd8, 0x4e, 0x96);
28 DEFINE_GUID(IID_ID3DXSPMesh,   0x667ea4c7, 0xf1cd, 0x4386, 0xb5, 0x23, 0x7c, 0x02, 0x90, 0xb8, 0x3c, 0xc5);
29 DEFINE_GUID(IID_ID3DXSkinInfo, 0x11eaa540, 0xf9a6, 0x4d49, 0xae, 0x6a, 0xe1, 0x92, 0x21, 0xf7, 0x0c, 0xc4);
30 DEFINE_GUID(IID_ID3DXPatchMesh,0x3ce6cc22, 0xdbf2, 0x44f4, 0x89, 0x4d, 0xf9, 0xc3, 0x4a, 0x33, 0x71, 0x39);
31 DEFINE_GUID(IID_ID3DXPRTBuffer,           0xf1827e47, 0x00a8, 0x49cd, 0x90, 0x8c, 0x9d, 0x11, 0x95, 0x5f, 0x87, 0x28);
32 DEFINE_GUID(IID_ID3DXPRTCompBuffer,       0xa758d465, 0xfe8d, 0x45ad, 0x9c, 0xf0, 0xd0, 0x1e, 0x56, 0x26, 0x6a, 0x07);
33 DEFINE_GUID(IID_ID3DXTextureGutterHelper, 0x838f01ec, 0x9729, 0x4527, 0xaa, 0xdb, 0xdf, 0x70, 0xad, 0xe7, 0xfe, 0xa9);
34 DEFINE_GUID(IID_ID3DXPRTEngine,           0x683a4278, 0xcd5f, 0x4d24, 0x90, 0xad, 0xc4, 0xe1, 0xb6, 0x85, 0x5d, 0x53);
35
36 #define UNUSED16 (0xffff)
37 #define UNUSED32 (0xffffffff)
38
39 enum _MAX_FVF_DECL_SIZE
40 {
41     MAX_FVF_DECL_SIZE = MAXD3DDECLLENGTH + 1
42 };
43
44 enum _D3DXMESH
45 {
46     D3DXMESH_32BIT                 = 0x001,
47     D3DXMESH_DONOTCLIP             = 0x002,
48     D3DXMESH_POINTS                = 0x004,
49     D3DXMESH_RTPATCHES             = 0x008,
50     D3DXMESH_NPATCHES              = 0x4000,
51     D3DXMESH_VB_SYSTEMMEM          = 0x010,
52     D3DXMESH_VB_MANAGED            = 0x020,
53     D3DXMESH_VB_WRITEONLY          = 0x040,
54     D3DXMESH_VB_DYNAMIC            = 0x080,
55     D3DXMESH_VB_SOFTWAREPROCESSING = 0x8000,
56     D3DXMESH_IB_SYSTEMMEM          = 0x100,
57     D3DXMESH_IB_MANAGED            = 0x200,
58     D3DXMESH_IB_WRITEONLY          = 0x400,
59     D3DXMESH_IB_DYNAMIC            = 0x800,
60     D3DXMESH_IB_SOFTWAREPROCESSING = 0x10000,
61     D3DXMESH_VB_SHARE              = 0x1000,
62     D3DXMESH_USEHWONLY             = 0x2000,
63     D3DXMESH_SYSTEMMEM             = 0x110,
64     D3DXMESH_MANAGED               = 0x220,
65     D3DXMESH_WRITEONLY             = 0x440,
66     D3DXMESH_DYNAMIC               = 0x880,
67     D3DXMESH_SOFTWAREPROCESSING    = 0x18000
68 };
69
70 enum _D3DXMESHOPT
71 {
72     D3DXMESHOPT_DEVICEINDEPENDENT = 0x00400000,
73     D3DXMESHOPT_COMPACT           = 0x01000000,
74     D3DXMESHOPT_ATTRSORT          = 0x02000000,
75     D3DXMESHOPT_VERTEXCACHE       = 0x04000000,
76     D3DXMESHOPT_STRIPREORDER      = 0x08000000,
77     D3DXMESHOPT_IGNOREVERTS       = 0x10000000,
78     D3DXMESHOPT_DONOTSPLIT        = 0x20000000,
79 };
80
81 typedef enum _D3DXPATCHMESHTYPE
82 {
83     D3DXPATCHMESH_RECT        = 1,
84     D3DXPATCHMESH_TRI         = 2,
85     D3DXPATCHMESH_NPATCH      = 3,
86     D3DXPATCHMESH_FORCE_DWORD = 0x7fffffff,
87 } D3DXPATCHMESHTYPE;
88
89 enum _D3DXPATCHMESH
90 {
91     D3DXPATCHMESH_DEFAULT = 0,
92 };
93
94 enum _D3DXMESHSIMP
95 {
96     D3DXMESHSIMP_VERTEX = 0x1,
97     D3DXMESHSIMP_FACE   = 0x2,
98 };
99
100 typedef enum D3DXCLEANTYPE {
101     D3DXCLEAN_BACKFACING     = 0x00000001,
102     D3DXCLEAN_BOWTIES        = 0x00000002,
103
104     D3DXCLEAN_SKINNING       = D3DXCLEAN_BACKFACING,
105     D3DXCLEAN_OPTIMIZATION   = D3DXCLEAN_BACKFACING,
106     D3DXCLEAN_SIMPLIFICATION = D3DXCLEAN_BACKFACING | D3DXCLEAN_BOWTIES,
107 } D3DXCLEANTYPE;
108
109 typedef enum _D3DXTANGENT
110 {
111     D3DXTANGENT_WRAP_U =                  0x0001,
112     D3DXTANGENT_WRAP_V =                  0x0002,
113     D3DXTANGENT_WRAP_UV =                 0x0003,
114     D3DXTANGENT_DONT_NORMALIZE_PARTIALS = 0x0004,
115     D3DXTANGENT_DONT_ORTHOGONALIZE =      0x0008,
116     D3DXTANGENT_ORTHOGANALIZE_FROM_V =    0x0010,
117     D3DXTANGENT_ORTHOGANALIZE_FROM_U =    0x0020,
118     D3DXTANGENT_WEIGHT_BY_AREA =          0x0040,
119     D3DXTANGENT_WEIGHT_EQUAL =            0x0080,
120     D3DXTANGENT_WIND_CW =                 0x0100,
121     D3DXTANGENT_CALCULATE_NORMALS =       0x0200,
122     D3DXTANGENT_GENERATE_IN_PLACE =       0x0400,
123 } D3DXTANGENT;
124
125 typedef enum _D3DXIMT
126 {
127     D3DXIMT_WRAP_U   = 0x01,
128     D3DXIMT_WRAP_V   = 0x02,
129     D3DXIMT_WRAP_UV  = 0x03,
130 } D3DXIMT;
131
132 typedef enum _D3DXUVATLAS
133 {
134     D3DXUVATLAS_DEFAULT          = 0x00,
135     D3DXUVATLAS_GEODESIC_FAST    = 0x01,
136     D3DXUVATLAS_GEODESIC_QUALITY = 0x02,
137 } D3DXUVATLAS;
138
139 typedef enum _D3DXEFFECTDEFAULTTYPE
140 {
141     D3DXEDT_STRING     = 1,
142     D3DXEDT_FLOATS     = 2,
143     D3DXEDT_DWORD      = 3,
144     D3DXEDT_FORCEDWORD = 0x7fffffff,
145 } D3DXEFFECTDEFAULTTYPE;
146
147 enum _D3DXWELDEPSILONSFLAGS
148 {
149     D3DXWELDEPSILONS_WELDALL             = 0x1,
150     D3DXWELDEPSILONS_WELDPARTIALMATCHES  = 0x2,
151     D3DXWELDEPSILONS_DONOTREMOVEVERTICES = 0x4,
152     D3DXWELDEPSILONS_DONOTSPLIT          = 0x8,
153 };
154
155 typedef enum _D3DXSHCOMPRESSQUALITYTYPE
156 {
157     D3DXSHCQUAL_FASTLOWQUALITY  = 1,
158     D3DXSHCQUAL_SLOWHIGHQUALITY = 2,
159     D3DXSHCQUAL_FORCE_DWORD     = 0x7fffffff,
160 } D3DXSHCOMPRESSQUALITYTYPE;
161
162 typedef enum _D3DXSHGPUSIMOPT
163 {
164     D3DXSHGPUSIMOPT_SHADOWRES256   = 1,
165     D3DXSHGPUSIMOPT_SHADOWRES512   = 0,
166     D3DXSHGPUSIMOPT_SHADOWRES1024  = 2,
167     D3DXSHGPUSIMOPT_SHADOWRES2048  = 3,
168     D3DXSHGPUSIMOPT_HIGHQUALITY    = 4,
169     D3DXSHGPUSIMOPT_FORCE_DWORD    = 0x7fffffff,
170 } D3DXSHGPUSIMOPT;
171
172 typedef struct ID3DXBaseMesh* LPD3DXBASEMESH;
173 typedef struct ID3DXMesh* LPD3DXMESH;
174 typedef struct ID3DXPMesh *LPD3DXPMESH;
175 typedef struct ID3DXSPMesh *LPD3DXSPMESH;
176 typedef struct ID3DXSkinInfo *LPD3DXSKININFO;
177 typedef struct ID3DXPatchMesh *LPD3DXPATCHMESH;
178 typedef struct ID3DXPRTBuffer *LPD3DXPRTBUFFER;
179 typedef struct ID3DXPRTCompBuffer *LPD3DXPRTCOMPBUFFER;
180 typedef struct ID3DXPRTEngine *LPD3DXPRTENGINE;
181 typedef struct ID3DXTextureGutterHelper *LPD3DXTEXTUREGUTTERHELPER;
182
183 typedef struct _D3DXATTRIBUTERANGE {
184     DWORD AttribId;
185     DWORD FaceStart;
186     DWORD FaceCount;
187     DWORD VertexStart;
188     DWORD VertexCount;
189 } D3DXATTRIBUTERANGE;
190
191 typedef D3DXATTRIBUTERANGE* LPD3DXATTRIBUTERANGE;
192
193 typedef struct _D3DXMATERIAL
194 {
195     D3DMATERIAL9 MatD3D;
196     LPSTR pTextureFilename;
197 } D3DXMATERIAL, *LPD3DXMATERIAL;
198
199 typedef struct _D3DXEFFECTDEFAULT
200 {
201     LPSTR pParamName;
202     D3DXEFFECTDEFAULTTYPE Type;
203     DWORD NumBytes;
204     LPVOID pValue;
205 } D3DXEFFECTDEFAULT, *LPD3DXEFFECTDEFAULT;
206
207 typedef struct _D3DXEFFECTINSTANCE
208 {
209     LPSTR pEffectFilename;
210     DWORD NumDefaults;
211     LPD3DXEFFECTDEFAULT pDefaults;
212 } D3DXEFFECTINSTANCE, *LPD3DXEFFECTINSTANCE;
213
214 typedef struct _D3DXATTRIBUTEWEIGHTS
215 {
216     FLOAT Position;
217     FLOAT Boundary;
218     FLOAT Normal;
219     FLOAT Diffuse;
220     FLOAT Specular;
221     FLOAT Texcoords[8];
222     FLOAT Tangent;
223     FLOAT Binormal;
224 } D3DXATTRIBUTEWEIGHTS, *LPD3DXATTRIBUTEWEIGHTS;
225
226 typedef struct _D3DXWELDEPSILONS
227 {
228     FLOAT Position;
229     FLOAT BlendWeights;
230     FLOAT Normals;
231     FLOAT PSize;
232     FLOAT Specular;
233     FLOAT Diffuse;
234     FLOAT Texcoords[8];
235     FLOAT Tangent;
236     FLOAT Binormal;
237     FLOAT TessFactor;
238 } D3DXWELDEPSILONS, *LPD3DXWELDEPSILONS;
239
240 typedef struct _D3DXBONECOMBINATION
241 {
242     DWORD AttribId;
243     DWORD FaceStart;
244     DWORD FaceCount;
245     DWORD VertexStart;
246     DWORD VertexCout;
247     DWORD *BoneId;
248 } D3DXBONECOMBINATION, *LPD3DXBONECOMBINATION;
249
250 typedef struct _D3DXPATCHINFO
251 {
252     D3DXPATCHMESHTYPE PatchType;
253     D3DDEGREETYPE Degree;
254     D3DBASISTYPE Basis;
255 } D3DXPATCHINFO, *LPD3DXPATCHINFO;
256
257 typedef struct _D3DXINTERSECTINFO
258 {
259     DWORD FaceIndex;
260     FLOAT U;
261     FLOAT V;
262     FLOAT Dist;
263 } D3DXINTERSECTINFO, *LPD3DXINTERSECTINFO;
264
265 typedef struct _D3DXSHMATERIAL
266 {
267     D3DCOLORVALUE Diffuse;
268     BOOL bMirror;
269     BOOL bSubSurf;
270     FLOAT RelativeIndexOfRefraction;
271     D3DCOLORVALUE Absorption;
272     D3DCOLORVALUE ReducedScattering;
273 } D3DXSHMATERIAL;
274
275 typedef struct _D3DXSHPRTSPLITMESHVERTDATA
276 {
277     UINT uVertRemap;
278     UINT uSubCluster;
279     UCHAR ucVertStatus;
280 } D3DXSHPRTSPLITMESHVERTDATA;
281
282 typedef struct _D3DXSHPRTSPLITMESHCLUSTERDATA
283 {
284     UINT uVertStart;
285     UINT uVertLength;
286     UINT uFaceStart;
287     UINT uFaceLength;
288     UINT uClusterStart;
289     UINT uClusterLength;
290 } D3DXSHPRTSPLITMESHCLUSTERDATA;
291
292 typedef struct _XFILECOMPRESSEDANIMATIONSET
293 {
294     DWORD CompressedBlockSize;
295     FLOAT TicksPerSec;
296     DWORD PlaybackType;
297     DWORD BufferLength;
298 } XFILECOMPRESSEDANIMATIONSET;
299
300 typedef HRESULT (WINAPI *LPD3DXUVATLASCB)(FLOAT, LPVOID);
301 typedef HRESULT (WINAPI *LPD3DXIMTSIGNALCALLBACK)(CONST D3DXVECTOR2 *, UINT, UINT, VOID *, FLOAT *);
302 typedef HRESULT (WINAPI *LPD3DXSHPRTSIMCB)(float, LPVOID);
303
304 #undef INTERFACE
305 #define INTERFACE ID3DXBaseMesh
306
307 DECLARE_INTERFACE_(ID3DXBaseMesh, IUnknown)
308 {
309     /*** IUnknown methods ***/
310     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID* object) PURE;
311     STDMETHOD_(ULONG, AddRef)(THIS) PURE;
312     STDMETHOD_(ULONG, Release)(THIS) PURE;
313     /*** ID3DXBaseMesh ***/
314     STDMETHOD(DrawSubset)(THIS_ DWORD attrib_id) PURE;
315     STDMETHOD_(DWORD, GetNumFaces)(THIS) PURE;
316     STDMETHOD_(DWORD, GetNumVertices)(THIS) PURE;
317     STDMETHOD_(DWORD, GetFVF)(THIS) PURE;
318     STDMETHOD(GetDeclaration)(THIS_ D3DVERTEXELEMENT9 declaration[MAX_FVF_DECL_SIZE]) PURE;
319     STDMETHOD_(DWORD, GetNumBytesPerVertex)(THIS) PURE;
320     STDMETHOD_(DWORD, GetOptions)(THIS) PURE;
321     STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE9* device) PURE;
322     STDMETHOD(CloneMeshFVF)(THIS_ DWORD options, DWORD fvf, LPDIRECT3DDEVICE9 device, LPD3DXMESH* clone_mesh) PURE;
323     STDMETHOD(CloneMesh)(THIS_ DWORD options, CONST D3DVERTEXELEMENT9* declaration, LPDIRECT3DDEVICE9 device,
324         LPD3DXMESH* clone_mesh) PURE;
325     STDMETHOD(GetVertexBuffer)(THIS_ LPDIRECT3DVERTEXBUFFER9* vertex_buffer) PURE;
326     STDMETHOD(GetIndexBuffer)(THIS_ LPDIRECT3DINDEXBUFFER9* index_buffer) PURE;
327     STDMETHOD(LockVertexBuffer)(THIS_ DWORD flags, LPVOID* data) PURE;
328     STDMETHOD(UnlockVertexBuffer)(THIS) PURE;
329     STDMETHOD(LockIndexBuffer)(THIS_ DWORD flags, LPVOID* data) PURE;
330     STDMETHOD(UnlockIndexBuffer)(THIS) PURE;
331     STDMETHOD(GetAttributeTable)(THIS_ D3DXATTRIBUTERANGE* attrib_table, DWORD* attrib_table_size) PURE;
332     STDMETHOD(ConvertPointRepsToAdjacency)(THIS_ CONST DWORD* point_reps, DWORD* adjacency) PURE;
333     STDMETHOD(ConvertAdjacencyToPointReps)(THIS_ CONST DWORD* adjacency, DWORD* point_reps) PURE;
334     STDMETHOD(GenerateAdjacency)(THIS_ FLOAT epsilon, DWORD* adjacency) PURE;
335     STDMETHOD(UpdateSemantics)(THIS_ D3DVERTEXELEMENT9 declaration[MAX_FVF_DECL_SIZE]) PURE;
336 };
337
338
339 #undef INTERFACE
340 #define INTERFACE ID3DXMesh
341
342 DECLARE_INTERFACE_(ID3DXMesh, ID3DXBaseMesh)
343 {
344     /*** IUnknown methods ***/
345     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID* object) PURE;
346     STDMETHOD_(ULONG, AddRef)(THIS) PURE;
347     STDMETHOD_(ULONG, Release)(THIS) PURE;
348     /*** ID3DXBaseMesh ***/
349     STDMETHOD(DrawSubset)(THIS_ DWORD attrib_id) PURE;
350     STDMETHOD_(DWORD, GetNumFaces)(THIS) PURE;
351     STDMETHOD_(DWORD, GetNumVertices)(THIS) PURE;
352     STDMETHOD_(DWORD, GetFVF)(THIS) PURE;
353     STDMETHOD(GetDeclaration)(THIS_ D3DVERTEXELEMENT9 declaration[MAX_FVF_DECL_SIZE]) PURE;
354     STDMETHOD_(DWORD, GetNumBytesPerVertex)(THIS) PURE;
355     STDMETHOD_(DWORD, GetOptions)(THIS) PURE;
356     STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE9* device) PURE;
357     STDMETHOD(CloneMeshFVF)(THIS_ DWORD options, DWORD fvf, LPDIRECT3DDEVICE9 device, LPD3DXMESH* clone_mesh) PURE;
358     STDMETHOD(CloneMesh)(THIS_ DWORD options, CONST D3DVERTEXELEMENT9* declaration, LPDIRECT3DDEVICE9 device,
359         LPD3DXMESH* clone_mesh) PURE;
360     STDMETHOD(GetVertexBuffer)(THIS_ LPDIRECT3DVERTEXBUFFER9* vertex_buffer) PURE;
361     STDMETHOD(GetIndexBuffer)(THIS_ LPDIRECT3DINDEXBUFFER9* index_buffer) PURE;
362     STDMETHOD(LockVertexBuffer)(THIS_ DWORD flags, LPVOID* data) PURE;
363     STDMETHOD(UnlockVertexBuffer)(THIS) PURE;
364     STDMETHOD(LockIndexBuffer)(THIS_ DWORD flags, LPVOID* data) PURE;
365     STDMETHOD(UnlockIndexBuffer)(THIS) PURE;
366     STDMETHOD(GetAttributeTable)(THIS_ D3DXATTRIBUTERANGE* attrib_table, DWORD* attrib_table_size) PURE;
367     STDMETHOD(ConvertPointRepsToAdjacency)(THIS_ CONST DWORD* point_reps, DWORD* adjacency) PURE;
368     STDMETHOD(ConvertAdjacencyToPointReps)(THIS_ CONST DWORD* adjacency, DWORD* point_reps) PURE;
369     STDMETHOD(GenerateAdjacency)(THIS_ FLOAT epsilon, DWORD* adjacency) PURE;
370     STDMETHOD(UpdateSemantics)(THIS_ D3DVERTEXELEMENT9 declaration[MAX_FVF_DECL_SIZE]) PURE;
371     /*** ID3DXMesh ***/
372     STDMETHOD(LockAttributeBuffer)(THIS_ DWORD flags, DWORD** data) PURE;
373     STDMETHOD(UnlockAttributeBuffer)(THIS) PURE;
374     STDMETHOD(Optimize)(THIS_ DWORD flags, CONST DWORD* adjacency_in, DWORD* adjacency_out,
375         DWORD* face_remap, LPD3DXBUFFER* vertex_remap, LPD3DXMESH* opt_mesh) PURE;
376     STDMETHOD(OptimizeInplace)(THIS_ DWORD flags, CONST DWORD* adjacency_in, DWORD* adjacency_out,
377                      DWORD* face_remap, LPD3DXBUFFER* vertex_remap) PURE;
378     STDMETHOD(SetAttributeTable)(THIS_ CONST D3DXATTRIBUTERANGE* attrib_table, DWORD attrib_table_size) PURE;
379 };
380 #undef INTERFACE
381
382 #define INTERFACE ID3DXPMesh
383 DECLARE_INTERFACE_(ID3DXPMesh, ID3DXBaseMesh)
384 {
385     /*** IUnknown methods ***/
386     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID* object) PURE;
387     STDMETHOD_(ULONG, AddRef)(THIS) PURE;
388     STDMETHOD_(ULONG, Release)(THIS) PURE;
389     /*** ID3DXBaseMesh ***/
390     STDMETHOD(DrawSubset)(THIS_ DWORD attrib_id) PURE;
391     STDMETHOD_(DWORD, GetNumFaces)(THIS) PURE;
392     STDMETHOD_(DWORD, GetNumVertices)(THIS) PURE;
393     STDMETHOD_(DWORD, GetFVF)(THIS) PURE;
394     STDMETHOD(GetDeclaration)(THIS_ D3DVERTEXELEMENT9 declaration[MAX_FVF_DECL_SIZE]) PURE;
395     STDMETHOD_(DWORD, GetNumBytesPerVertex)(THIS) PURE;
396     STDMETHOD_(DWORD, GetOptions)(THIS) PURE;
397     STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE9* device) PURE;
398     STDMETHOD(CloneMeshFVF)(THIS_ DWORD options, DWORD fvf, LPDIRECT3DDEVICE9 device, LPD3DXMESH* clone_mesh) PURE;
399     STDMETHOD(CloneMesh)(THIS_ DWORD options, CONST D3DVERTEXELEMENT9* declaration, LPDIRECT3DDEVICE9 device,
400         LPD3DXMESH* clone_mesh) PURE;
401     STDMETHOD(GetVertexBuffer)(THIS_ LPDIRECT3DVERTEXBUFFER9* vertex_buffer) PURE;
402     STDMETHOD(GetIndexBuffer)(THIS_ LPDIRECT3DINDEXBUFFER9* index_buffer) PURE;
403     STDMETHOD(LockVertexBuffer)(THIS_ DWORD flags, LPVOID* data) PURE;
404     STDMETHOD(UnlockVertexBuffer)(THIS) PURE;
405     STDMETHOD(LockIndexBuffer)(THIS_ DWORD flags, LPVOID* data) PURE;
406     STDMETHOD(UnlockIndexBuffer)(THIS) PURE;
407     STDMETHOD(GetAttributeTable)(THIS_ D3DXATTRIBUTERANGE* attrib_table, DWORD* attrib_table_size) PURE;
408     STDMETHOD(ConvertPointRepsToAdjacency)(THIS_ CONST DWORD* point_reps, DWORD* adjacency) PURE;
409     STDMETHOD(ConvertAdjacencyToPointReps)(THIS_ CONST DWORD* adjacency, DWORD* point_reps) PURE;
410     STDMETHOD(GenerateAdjacency)(THIS_ FLOAT epsilon, DWORD* adjacency) PURE;
411     STDMETHOD(UpdateSemantics)(THIS_ D3DVERTEXELEMENT9 declaration[MAX_FVF_DECL_SIZE]) PURE;
412     /*** ID3DXPMesh ***/
413     STDMETHOD(ClonePMeshFVF)(THIS_ DWORD options, DWORD fvf, LPDIRECT3DDEVICE9 device, LPD3DXPMESH* clone_mesh) PURE;
414     STDMETHOD(ClonePMesh)(THIS_ DWORD options, CONST D3DVERTEXELEMENT9* declaration, LPDIRECT3DDEVICE9 device,
415         LPD3DXPMESH* clone_mesh) PURE;
416     STDMETHOD(SetNumFaces)(THIS_ DWORD faces) PURE;
417     STDMETHOD(SetNumVertices)(THIS_ DWORD vertices) PURE;
418     STDMETHOD_(DWORD, GetMaxFaces)(THIS) PURE;
419     STDMETHOD_(DWORD, GetMinFaces)(THIS) PURE;
420     STDMETHOD_(DWORD, GetMaxVertices)(THIS) PURE;
421     STDMETHOD_(DWORD, GetMinVertices)(THIS) PURE;
422     STDMETHOD(Save)(THIS_ IStream *stream, CONST D3DXMATERIAL* material, CONST D3DXEFFECTINSTANCE* effect_instance, DWORD num_materials) PURE;
423     STDMETHOD(Optimize)(THIS_ DWORD flags, DWORD* adjacency_out, DWORD* face_remap,
424         LPD3DXBUFFER* vertex_remap, LPD3DXMESH* opt_mesh) PURE;
425     STDMETHOD(OptimizeBaseLOD)(THIS_ DWORD flags, DWORD* face_remap) PURE;
426     STDMETHOD(TrimByFaces)(THIS_ DWORD new_faces_min, DWORD new_faces_max, DWORD* face_remap, DWORD* vertex_remap) PURE;
427     STDMETHOD(TrimByVertices)(THIS_ DWORD new_vertices_min, DWORD new_vertices_max, DWORD* face_remap, DWORD* vertex_remap) PURE;
428     STDMETHOD(GetAdjacency)(THIS_ DWORD* adjacency) PURE;
429     STDMETHOD(GenerateVertexHistory)(THIS_ DWORD* vertex_history) PURE;
430 };
431 #undef INTERFACE
432
433 #define INTERFACE ID3DXSPMesh
434 DECLARE_INTERFACE_(ID3DXSPMesh, IUnknown)
435 {
436     /*** IUnknown methods ***/
437     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID* object) PURE;
438     STDMETHOD_(ULONG, AddRef)(THIS) PURE;
439     STDMETHOD_(ULONG, Release)(THIS) PURE;
440     /*** ID3DXSPMesh ***/
441     STDMETHOD_(DWORD, GetNumFaces)(THIS) PURE;
442     STDMETHOD_(DWORD, GetNumVertices)(THIS) PURE;
443     STDMETHOD_(DWORD, GetNumFVF)(THIS) PURE;
444     STDMETHOD(GetDeclaration)(THIS_ D3DVERTEXELEMENT9 declaration[MAX_FVF_DECL_SIZE]) PURE;
445     STDMETHOD_(DWORD, GetOptions)(THIS) PURE;
446     STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE9* device) PURE;
447     STDMETHOD(CloneMeshFVF)(THIS_ DWORD options, DWORD fvf, LPDIRECT3DDEVICE9 device, DWORD* adjacency_out,
448         DWORD* vertex_remap_out, LPD3DXMESH* clone_mesh) PURE;
449     STDMETHOD(CloneMesh)(THIS_ DWORD options, CONST D3DVERTEXELEMENT9* declaration, LPDIRECT3DDEVICE9 device,
450         DWORD* adjacency_out, DWORD* vertex_remap_out, LPD3DXMESH* clone_mesh) PURE;
451     STDMETHOD(ClonePMeshFVF)(THIS_ DWORD options, DWORD fvf, LPDIRECT3DDEVICE9 device, DWORD* vertex_remap_out,
452         FLOAT* errors_by_face, LPD3DXPMESH* clone_mesh) PURE;
453     STDMETHOD(ClonePMesh)(THIS_ DWORD options, CONST D3DVERTEXELEMENT9* declaration, LPDIRECT3DDEVICE9 device,
454         DWORD* vertex_remap_out, FLOAT* errors_by_face, LPD3DXPMESH* clone_mesh) PURE;
455     STDMETHOD(ReduceFaces)(THIS_ DWORD faces) PURE;
456     STDMETHOD(ReduceVertices)(THIS_ DWORD vertices) PURE;
457     STDMETHOD_(DWORD, GetMaxFaces)(THIS) PURE;
458     STDMETHOD_(DWORD, GetMaxVertices)(THIS) PURE;
459     STDMETHOD(GetVertexAttributeWeights)(THIS_ LPD3DXATTRIBUTEWEIGHTS vertex_attribute_weights) PURE;
460     STDMETHOD(GetVertexWeights)(THIS_ FLOAT* vertex_weights) PURE;
461 };
462 #undef INTERFACE
463
464 #define INTERFACE ID3DXPatchMesh
465 DECLARE_INTERFACE_(ID3DXPatchMesh, IUnknown)
466 {
467     /*** IUnknown methods ***/
468     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID* object) PURE;
469     STDMETHOD_(ULONG, AddRef)(THIS) PURE;
470     STDMETHOD_(ULONG, Release)(THIS) PURE;
471     /*** ID3DXPatchMesh ***/
472     STDMETHOD_(DWORD, GetNumPatches)(THIS) PURE;
473     STDMETHOD_(DWORD, GetNumVertices)(THIS) PURE;
474     STDMETHOD(GetDeclaration)(THIS_ D3DVERTEXELEMENT9 declaration[MAX_FVF_DECL_SIZE]) PURE;
475     STDMETHOD_(DWORD, GetControlVerticesPerPatch)(THIS) PURE;
476     STDMETHOD_(DWORD, GetOptions)(THIS) PURE;
477     STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE9* device) PURE;
478     STDMETHOD(GetPatchInfo)(THIS_ LPD3DXPATCHINFO patch_info) PURE;
479     STDMETHOD(GetVertexBuffer)(THIS_ LPDIRECT3DVERTEXBUFFER9* vertex_buffer) PURE;
480     STDMETHOD(GetIndexBuffer)(THIS_ LPDIRECT3DINDEXBUFFER9* index_buffer) PURE;
481     STDMETHOD(LockVertexBuffer)(THIS_ DWORD flags, LPVOID* data) PURE;
482     STDMETHOD(UnlockVertexBuffer)(THIS) PURE;
483     STDMETHOD(LockIndexBuffer)(THIS_ DWORD flags, LPVOID* data) PURE;
484     STDMETHOD(UnlockIndexBuffer)(THIS) PURE;
485     STDMETHOD(LockAttributeBuffer)(THIS_ DWORD flags, DWORD** data) PURE;
486     STDMETHOD(UnlockAttributeBuffer)(THIS) PURE;
487     STDMETHOD(GetTessSize)(THIS_ FLOAT tess_level, DWORD adaptive, DWORD* num_triangles, DWORD* num_vertices) PURE;
488     STDMETHOD(GenerateAdjacency)(THIS_ FLOAT tolerance) PURE;
489     STDMETHOD(CloneMesh)(THIS_ DWORD options, CONST D3DVERTEXELEMENT9* declaration, LPD3DXPATCHMESH *clone_mesh) PURE;
490     STDMETHOD(Optimize)(THIS_ DWORD flags) PURE;
491     STDMETHOD(SetDisplaceParam)(THIS_ LPDIRECT3DBASETEXTURE9 texture, D3DTEXTUREFILTERTYPE min_filter,
492         D3DTEXTUREFILTERTYPE mag_filter, D3DTEXTUREFILTERTYPE mip_filter, D3DTEXTUREADDRESS wrap, DWORD lod_bias) PURE;
493     STDMETHOD(GetDisplaceParam)(THIS_ LPDIRECT3DBASETEXTURE9* texture, D3DTEXTUREFILTERTYPE* min_filter,
494         D3DTEXTUREFILTERTYPE* mag_filter, D3DTEXTUREFILTERTYPE* mip_filter, D3DTEXTUREADDRESS* wrap, DWORD* lod_bias) PURE;
495     STDMETHOD(Tessellate)(THIS_ FLOAT tess_level, LPD3DXMESH mesh) PURE;
496     STDMETHOD(TessellateAdaptive)(THIS_ CONST D3DXVECTOR4* trans, DWORD max_tess_level, DWORD min_tess_level, LPD3DXMESH mesh) PURE;
497 };
498 #undef INTERFACE
499
500 #define INTERFACE ID3DXSkinInfo
501 DECLARE_INTERFACE_(ID3DXSkinInfo, IUnknown)
502 {
503     /*** IUnknown methods ***/
504     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID* object) PURE;
505     STDMETHOD_(ULONG, AddRef)(THIS) PURE;
506     STDMETHOD_(ULONG, Release)(THIS) PURE;
507     /*** ID3DXSkinInfo ***/
508     STDMETHOD(SetBoneInfluence)(THIS_ DWORD bone, DWORD num_influences, CONST DWORD* vertices, CONST FLOAT* weights) PURE;
509     STDMETHOD(SetBoneVertexInfluence)(THIS_ DWORD bone_num, DWORD influence_num, float weight) PURE;
510     STDMETHOD_(DWORD, GetNumBoneInfluences)(THIS_ DWORD bone) PURE;
511     STDMETHOD(GetBoneInfluence)(THIS_ DWORD bone, DWORD* vertices, FLOAT* weights) PURE;
512     STDMETHOD(GetBoneVertexInfluence)(THIS_ DWORD bone_num, DWORD influence_num, float *weight, DWORD* vertex_num) PURE;
513     STDMETHOD(GetMaxVertexInfluences)(THIS_ DWORD* max_vertex_influences) PURE;
514     STDMETHOD_(DWORD, GetNumBones)(THIS) PURE;
515     STDMETHOD(FindBoneVertexInfluenceIndex)(THIS_ DWORD bone_num, DWORD vertex_num, DWORD* influence_index) PURE;
516     STDMETHOD(GetMaxFaceInfluences)(THIS_ LPDIRECT3DINDEXBUFFER9 index_buffer, DWORD num_faces, DWORD* max_face_influences) PURE;
517     STDMETHOD(SetMinBoneInfluence)(THIS_ FLOAT min_influence) PURE;
518     STDMETHOD_(FLOAT, GetMinBoneInfluence)(THIS) PURE;
519     STDMETHOD(SetBoneName)(THIS_ DWORD bone, LPCSTR name) PURE;
520     STDMETHOD_(LPCSTR, GetBoneName)(THIS_ DWORD bone) PURE;
521     STDMETHOD(SetBoneOffsetMatrix)(THIS_ DWORD bone, CONST D3DXMATRIX* bone_transform) PURE;
522     STDMETHOD_(LPD3DXMATRIX, GetBoneOffsetMatrix)(THIS_ DWORD bone) PURE;
523     STDMETHOD(Clone)(THIS_ LPD3DXSKININFO* skin_info) PURE;
524     STDMETHOD(Remap)(THIS_ DWORD num_vertices, DWORD* vertex_remap) PURE;
525     STDMETHOD(SetFVF)(THIS_ DWORD FVF) PURE;
526     STDMETHOD(SetDeclaration)(THIS_ CONST D3DVERTEXELEMENT9* declaration) PURE;
527     STDMETHOD_(DWORD, GetFVF)(THIS) PURE;
528     STDMETHOD(GetDeclaration)(THIS_ D3DVERTEXELEMENT9 declaration[MAX_FVF_DECL_SIZE]) PURE;
529     STDMETHOD(UpdateSkinnedMesh)(THIS_ CONST D3DXMATRIX* bone_transforms,
530         CONST D3DXMATRIX* bone_inv_transpose_transforms, LPCVOID vertices_src, PVOID vertices_dest) PURE;
531     STDMETHOD(ConvertToBlendedMesh)(THIS_ LPD3DXMESH mesh_in, DWORD options, CONST DWORD *adjacency_in,
532         LPDWORD adjacency_out, DWORD* face_remap, LPD3DXBUFFER* vertex_remap, DWORD* max_face_infl,
533         DWORD* num_bone_combinations, LPD3DXBUFFER* bone_combination_table, LPD3DXMESH* mesh_out) PURE;
534     STDMETHOD(ConvertToIndexedBlendedMesh)(THIS_ LPD3DXMESH mesh_in, DWORD options, CONST DWORD *adjacency_in,
535         LPDWORD adjacency_out, DWORD* face_remap, LPD3DXBUFFER* vertex_remap, DWORD* max_face_infl,
536         DWORD* num_bone_combinations, LPD3DXBUFFER* bone_combination_table, LPD3DXMESH* mesh_out) PURE;
537 };
538 #undef INTERFACE
539
540 #define INTERFACE ID3DXPRTBuffer
541 DECLARE_INTERFACE_(ID3DXPRTBuffer, IUnknown)
542 {
543     /*** IUnknown methods ***/
544     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID* object) PURE;
545     STDMETHOD_(ULONG, AddRef)(THIS) PURE;
546     STDMETHOD_(ULONG, Release)(THIS) PURE;
547     /*** ID3DXPRTBuffer methods ***/
548     STDMETHOD_(UINT, GetNumSamples)(THIS) PURE;
549     STDMETHOD_(UINT, GetNumCoeffs)(THIS) PURE;
550     STDMETHOD_(UINT, GetNumChannels)(THIS) PURE;
551     STDMETHOD_(BOOL, IsTexture)(THIS) PURE;
552     STDMETHOD_(BOOL, GetWidth)(THIS) PURE;
553     STDMETHOD_(BOOL, GetHeight)(THIS) PURE;
554     STDMETHOD(Resize)(THIS_ UINT new_size) PURE;
555     STDMETHOD(LockBuffer)(THIS_ UINT start, UINT num_samples, FLOAT **data) PURE;
556     STDMETHOD(UnlockBuffer)(THIS) PURE;
557     STDMETHOD(ScaleBuffer)(THIS_ FLOAT scale) PURE;
558     STDMETHOD(AddBuffer)(THIS_ LPD3DXPRTBUFFER buffer) PURE;
559     STDMETHOD(AttachGH)(THIS_ LPD3DXTEXTUREGUTTERHELPER) PURE;
560     STDMETHOD(ReleaseGH)(THIS) PURE;
561     STDMETHOD(EvalGH)(THIS) PURE;
562     STDMETHOD(ExtractTexture)(THIS_ UINT channel, UINT start_coefficient,
563         UINT num_coefficients, LPDIRECT3DTEXTURE9 texture) PURE;
564     STDMETHOD(ExtractToMesh)(THIS_ UINT num_coefficients, D3DDECLUSAGE usage,
565         UINT usage_index_start, LPD3DXMESH scene) PURE;
566 };
567 #undef INTERFACE
568
569 #define INTERFACE ID3DXPRTCompBuffer
570 DECLARE_INTERFACE_(ID3DXPRTCompBuffer, IUnknown)
571 {
572     /*** IUnknown methods ***/
573     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID* object) PURE;
574     STDMETHOD_(ULONG, AddRef)(THIS) PURE;
575     STDMETHOD_(ULONG, Release)(THIS) PURE;
576     /*** ID3DXPRTCompBuffer methods ***/
577     STDMETHOD_(UINT, GetNumSamples)(THIS) PURE;
578     STDMETHOD_(UINT, GetNumCoeffs)(THIS) PURE;
579     STDMETHOD_(UINT, GetNumChannels)(THIS) PURE;
580     STDMETHOD_(BOOL, IsTexture)(THIS) PURE;
581     STDMETHOD_(UINT, GetWidth)(THIS) PURE;
582     STDMETHOD_(UINT, GetHeight)(THIS) PURE;
583     STDMETHOD_(UINT, GetNumClusters)(THIS) PURE;
584     STDMETHOD_(UINT, GetNumPCA)(THIS) PURE;
585     STDMETHOD(NormalizeData)(THIS) PURE;
586     STDMETHOD(ExtractBasis)(THIS_ UINT cluster, FLOAT *cluster_basis) PURE;
587     STDMETHOD(ExtractClusterIDs)(THIS_ UINT *cluster_ids) PURE;
588     STDMETHOD(ExtractPCA)(THIS_ UINT start_pca, UINT num_extract, FLOAT *pca_coefficients) PURE;
589     STDMETHOD(ExtractTexture)(THIS_ UINT start_pca, UINT num_pca, LPDIRECT3DTEXTURE9 texture) PURE;
590     STDMETHOD(ExtractToMesh)(THIS_ UINT num_pca, D3DDECLUSAGE usage, UINT usage_index_start, LPD3DXMESH scene) PURE;
591 };
592 #undef INTERFACE
593
594 #define INTERFACE ID3DXTextureGutterHelper
595 DECLARE_INTERFACE_(ID3DXTextureGutterHelper, IUnknown)
596 {
597     /*** IUnknown methods ***/
598     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID* object) PURE;
599     STDMETHOD_(ULONG, AddRef)(THIS) PURE;
600     STDMETHOD_(ULONG, Release)(THIS) PURE;
601     /*** ID3DXTextureGutterHelper methods ***/
602     STDMETHOD_(UINT, GetWidth)(THIS) PURE;
603     STDMETHOD_(UINT, GetHeight)(THIS) PURE;
604
605     STDMETHOD(ApplyGuttersFloat)(THIS_ FLOAT *data_in, UINT num_coeffs, UINT width, UINT height) PURE;
606     STDMETHOD(ApplyGuttersTex)(THIS_ LPDIRECT3DTEXTURE9 texture) PURE;
607     STDMETHOD(ApplyGuttersPRT)(THIS_ LPD3DXPRTBUFFER buffer) PURE;
608     STDMETHOD(ResampleTex)(THIS_ LPDIRECT3DTEXTURE9 texture_in, LPD3DXMESH mesh_in,
609         D3DDECLUSAGE usage, UINT usage_index, LPDIRECT3DTEXTURE9 texture_out) PURE;
610     STDMETHOD(GetFaceMap)(THIS_ UINT *face_data) PURE;
611     STDMETHOD(GetBaryMap)(THIS_ D3DXVECTOR2 *bary_data) PURE;
612     STDMETHOD(GetTexelMap)(THIS_ D3DXVECTOR2 *texel_data) PURE;
613     STDMETHOD(GetGutterMap)(THIS_ BYTE *gutter_data) PURE;
614     STDMETHOD(SetFaceMap)(THIS_ UINT *face_data) PURE;
615     STDMETHOD(SetBaryMap)(THIS_ D3DXVECTOR2 *bary_data) PURE;
616     STDMETHOD(SetTexelMap)(THIS_ D3DXVECTOR2 *texel_data) PURE;
617     STDMETHOD(SetGutterMap)(THIS_ BYTE *gutter_data) PURE;
618 };
619 #undef INTERFACE
620
621 #define INTERFACE ID3DXPRTEngine
622 DECLARE_INTERFACE_(ID3DXPRTEngine, IUnknown)
623 {
624     /*** IUnknown methods ***/
625     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID* object) PURE;
626     STDMETHOD_(ULONG, AddRef)(THIS) PURE;
627     STDMETHOD_(ULONG, Release)(THIS) PURE;
628     /*** ID3DXPRTEngine methods ***/
629     STDMETHOD(SetMeshMaterials)(THIS_ CONST D3DXSHMATERIAL **materials, UINT num_meshes,
630         UINT num_channels, BOOL set_albedo, FLOAT length_scale) PURE;
631     STDMETHOD(SetPerVertexAlbedo)(THIS_ CONST VOID *data_in, UINT num_channels, UINT stride) PURE;
632     STDMETHOD(SetPerTexelAlbedo)(THIS_ LPDIRECT3DTEXTURE9 albedo_texture, UINT num_channels,
633         LPD3DXTEXTUREGUTTERHELPER gh) PURE;
634     STDMETHOD(GetVertexAlbedo)(THIS_ D3DXCOLOR *vert_colors, UINT num_verts) PURE;
635     STDMETHOD(SetPerTexelNormals)(THIS_ LPDIRECT3DTEXTURE9 normal_texture) PURE;
636     STDMETHOD(ExtractPerVertexAlbedo)(THIS_ LPD3DXMESH mesh, D3DDECLUSAGE usage, UINT num_channels) PURE;
637     STDMETHOD(ResampleBuffer)(THIS_ LPD3DXPRTBUFFER buffer_in, LPD3DXPRTBUFFER buffer_out) PURE;
638     STDMETHOD(GetAdaptedMesh)(THIS_ LPDIRECT3DDEVICE9 device, UINT *face_remap,
639         UINT *vert_remap, FLOAT *vert_weights, LPD3DXMESH *mesh) PURE;
640     STDMETHOD_(UINT, GetNumVerts)(THIS) PURE;
641     STDMETHOD_(UINT, GetNumFaces)(THIS) PURE;
642     STDMETHOD(SetMinMaxIntersection)(THIS_ FLOAT min, FLOAT max) PURE;
643     STDMETHOD(RobustMeshRefine)(THIS_ FLOAT min_edge_length, UINT max_subdiv) PURE;
644     STDMETHOD(SetSamplingInfo)(THIS_ UINT num_rays, BOOL use_sphere,
645         BOOL use_cosine, BOOL adaptive, FLOAT adpative_thresh) PURE;
646     STDMETHOD(ComputeDirectLightingSH)(THIS_ UINT sh_order, LPD3DXPRTBUFFER data_out) PURE;
647     STDMETHOD(ComputeDirectLightingSHAdaptive)(THIS_ UINT sh_order, FLOAT adaptive_thresh,
648         FLOAT min_edge_length, UINT max_subdiv, LPD3DXPRTBUFFER data_out) PURE;
649     STDMETHOD(ComputeDirectLightingSHGPU)(THIS_ LPDIRECT3DDEVICE9 device, UINT flags,
650         UINT sh_order, FLOAT zbias, FLOAT zangle_bias, LPD3DXPRTBUFFER data_out) PURE;
651     STDMETHOD(ComputeSS)(THIS_ LPD3DXPRTBUFFER data_in, LPD3DXPRTBUFFER data_out,
652         LPD3DXPRTBUFFER data_total) PURE;
653     STDMETHOD(ComputeSSAdaptive)(THIS_ LPD3DXPRTBUFFER data_in, FLOAT adaptive_thres,
654         FLOAT min_edge_length, UINT max_subdiv, LPD3DXPRTBUFFER data_out, LPD3DXPRTBUFFER data_total) PURE;
655     STDMETHOD(ComputeBounce)(THIS_ LPD3DXPRTBUFFER data_in, LPD3DXPRTBUFFER data_out,
656         LPD3DXPRTBUFFER data_total) PURE;
657     STDMETHOD(ComputeBounceAdaptive)(THIS_ LPD3DXPRTBUFFER data_in, FLOAT adaptive_thres,
658         FLOAT min_edge_length, UINT max_subdiv, LPD3DXPRTBUFFER data_out, LPD3DXPRTBUFFER data_total) PURE;
659     STDMETHOD(ComputeVolumeSamplesDirectSH)(THIS_ UINT sh_order_in, UINT sh_order_out,
660         UINT num_vol_samples, CONST D3DXVECTOR3 *sample_locs, LPD3DXPRTBUFFER data_out) PURE;
661     STDMETHOD(ComputeVolumeSamples)(THIS_ LPD3DXPRTBUFFER surf_data_in, UINT sh_order,
662         UINT num_vol_samples, CONST D3DXVECTOR3 *sample_locs, LPD3DXPRTBUFFER data_out) PURE;
663     STDMETHOD(ComputeSurfSamplesDirectSH)(THIS_ UINT sh_order, UINT num_samples,
664         CONST D3DXVECTOR3 *sample_locs, CONST D3DXVECTOR3 *sample_norms, LPD3DXPRTBUFFER data_out) PURE;
665     STDMETHOD(ComputeSurfSamplesBounce)(THIS_ LPD3DXPRTBUFFER surf_data_in, UINT num_samples,
666         CONST D3DXVECTOR3 *sample_locs, CONST D3DXVECTOR3 *sample_norms, LPD3DXPRTBUFFER data_out,
667         LPD3DXPRTBUFFER data_total) PURE;
668     STDMETHOD(FreeSSData)(THIS) PURE;
669     STDMETHOD(FreeBounceData)(THIS) PURE;
670     STDMETHOD(ComputeLDPRTCoeffs)(THIS_ LPD3DXPRTBUFFER data_in, UINT sh_order, D3DXVECTOR3 *norm_out,
671         LPD3DXPRTBUFFER data_out) PURE;
672     STDMETHOD(ScaleMeshChunk)(THIS_ UINT mesh_chunk, FLOAT scale, LPD3DXPRTBUFFER data_out) PURE;
673     STDMETHOD(MultiplyAlbedo)(THIS_ LPD3DXPRTBUFFER data_out) PURE;
674     STDMETHOD(SetCallback)(THIS_ LPD3DXSHPRTSIMCB cb, FLOAT frequency, LPVOID user_context) PURE;
675     STDMETHOD_(BOOL, ShadowRayIntersects)(THIS_ CONST D3DXVECTOR3 *ray_pos, CONST D3DXVECTOR3 *ray_dir) PURE;
676     STDMETHOD_(BOOL, ClosestRayIntersects)(THIS_ CONST D3DXVECTOR3 *ray_pos, CONST D3DXVECTOR3 *ray_dir,
677         DWORD *face_index, FLOAT *u, FLOAT *v, FLOAT *dist) PURE;
678 };
679
680 #ifdef __cplusplus
681 extern "C" {
682 #endif
683
684 HRESULT WINAPI D3DXCreateMesh(DWORD, DWORD, DWORD, CONST D3DVERTEXELEMENT9 *, LPDIRECT3DDEVICE9, LPD3DXMESH *);
685 HRESULT WINAPI D3DXCreateMeshFVF(DWORD, DWORD, DWORD, DWORD, LPDIRECT3DDEVICE9, LPD3DXMESH *);
686 HRESULT WINAPI D3DXCreateBuffer(DWORD, LPD3DXBUFFER*);
687 HRESULT WINAPI D3DXCreateSPMesh(LPD3DXMESH, CONST DWORD *, CONST D3DXATTRIBUTEWEIGHTS, CONST FLOAT *, LPD3DXSPMESH *);
688 HRESULT WINAPI D3DXCreatePMeshFromStream(IStream *, DWORD, LPDIRECT3DDEVICE9, LPD3DXBUFFER *, LPD3DXBUFFER *, DWORD *, LPD3DXPMESH *);
689 HRESULT WINAPI D3DXCreateSkinInfo(DWORD, CONST D3DVERTEXELEMENT9 *, DWORD, LPD3DXSKININFO *);
690 HRESULT WINAPI D3DXCreateSkinInfoFVF(DWORD, DWORD, DWORD, LPD3DXSKININFO *);
691 HRESULT WINAPI D3DXCreateSkinInfoFromBlendedMesh(LPD3DXBASEMESH, DWORD, CONST D3DXBONECOMBINATION *, LPD3DXSKININFO *);
692 HRESULT WINAPI D3DXCreatePatchMesh(CONST D3DXPATCHINFO *, DWORD, DWORD, DWORD, CONST D3DVERTEXELEMENT9 *, LPDIRECT3DDEVICE9, LPD3DXPATCHMESH *);
693 HRESULT WINAPI D3DXCreatePRTBuffer(UINT, UINT, UINT, LPD3DXPRTBUFFER *);
694 HRESULT WINAPI D3DXCreatePRTBufferTex(UINT, UINT, UINT, UINT, LPD3DXPRTBUFFER *);
695 HRESULT WINAPI D3DXCreatePRTCompBuffer(D3DXSHCOMPRESSQUALITYTYPE, UINT, UINT, LPD3DXSHPRTSIMCB, LPVOID, LPD3DXPRTBUFFER, LPD3DXPRTCOMPBUFFER *);
696 HRESULT WINAPI D3DXCreateTextureGutterHelper(UINT, UINT, LPD3DXMESH, FLOAT, LPD3DXTEXTUREGUTTERHELPER *);
697 HRESULT WINAPI D3DXCreatePRTEngine(LPD3DXMESH, DWORD *, BOOL, LPD3DXMESH, LPD3DXPRTENGINE *);
698 HRESULT WINAPI D3DXLoadMeshFromXA(LPCSTR, DWORD, LPDIRECT3DDEVICE9, LPD3DXBUFFER *, LPD3DXBUFFER *, LPD3DXBUFFER *, DWORD *, LPD3DXMESH *);
699 HRESULT WINAPI D3DXLoadMeshFromXW(LPCWSTR, DWORD, LPDIRECT3DDEVICE9, LPD3DXBUFFER *, LPD3DXBUFFER *, LPD3DXBUFFER *, DWORD *, LPD3DXMESH *);
700 #define D3DXLoadMeshFromX WINELIB_NAME_AW(D3DXLoadMeshFromX)
701 HRESULT WINAPI D3DXLoadMeshFromXInMemory(LPCVOID, DWORD, DWORD, LPDIRECT3DDEVICE9, LPD3DXBUFFER *, LPD3DXBUFFER *, LPD3DXBUFFER *, DWORD *, LPD3DXMESH *);
702 HRESULT WINAPI D3DXLoadMeshFromXResource(HMODULE, LPCSTR, LPCSTR, DWORD, LPDIRECT3DDEVICE9, LPD3DXBUFFER *, LPD3DXBUFFER *, LPD3DXBUFFER *, DWORD *, LPD3DXMESH *);
703 HRESULT WINAPI D3DXLoadMeshFromXof(LPD3DXFILEDATA, DWORD, LPDIRECT3DDEVICE9, LPD3DXBUFFER *, LPD3DXBUFFER *, LPD3DXBUFFER *, DWORD *, LPD3DXMESH *);
704 HRESULT WINAPI D3DXLoadPatchMeshFromXof(LPD3DXFILEDATA, DWORD, LPDIRECT3DDEVICE9, LPD3DXBUFFER *, LPD3DXBUFFER *, LPD3DXBUFFER *, DWORD *, LPD3DXPATCHMESH *);
705 HRESULT WINAPI D3DXLoadSkinMeshFromXof(LPD3DXFILEDATA, DWORD, LPDIRECT3DDEVICE9, LPD3DXBUFFER *, LPD3DXBUFFER *, LPD3DXBUFFER *, DWORD *, LPD3DXSKININFO *, LPD3DXMESH *);
706 HRESULT WINAPI D3DXLoadPRTBufferFromFileA(LPCSTR, LPD3DXPRTBUFFER *);
707 HRESULT WINAPI D3DXLoadPRTBufferFromFileW(LPCWSTR, LPD3DXPRTBUFFER *);
708 #define D3DXLoadPRTBufferFromFile WINELIB_NAME_AW(D3DXLoadPRTBufferFromFile)
709 HRESULT WINAPI D3DXLoadPRTCompBufferFromFileA(LPCSTR, LPD3DXPRTCOMPBUFFER *);
710 HRESULT WINAPI D3DXLoadPRTCompBufferFromFileW(LPCWSTR, LPD3DXPRTCOMPBUFFER *);
711 #define D3DXLoadPRTCompBufferFromFile WINELIB_NAME_AW(D3DXLoadPRTCompBufferFromFile)
712 HRESULT WINAPI D3DXSaveMeshToXA(LPCSTR, LPD3DXMESH, CONST DWORD *, CONST D3DXMATERIAL *, CONST D3DXEFFECTINSTANCE *, DWORD, DWORD);
713 HRESULT WINAPI D3DXSaveMeshToXW(LPCWSTR, LPD3DXMESH, CONST DWORD *, CONST D3DXMATERIAL *, CONST D3DXEFFECTINSTANCE *, DWORD, DWORD);
714 #define D3DXSaveMeshToX WINELIB_NAME_AW(D3DXSaveMeshToX)
715 HRESULT WINAPI D3DXSavePRTBufferToFileA(LPCSTR, LPD3DXPRTBUFFER);
716 HRESULT WINAPI D3DXSavePRTBufferToFileW(LPCWSTR, LPD3DXPRTBUFFER);
717 #define D3DXSavePRTBufferToFile WINELIB_NAME_AW(D3DXSavePRTBufferToFile)
718 HRESULT WINAPI D3DXSavePRTCompBufferToFileA(LPCSTR, LPD3DXPRTCOMPBUFFER);
719 HRESULT WINAPI D3DXSavePRTCompBufferToFileW(LPCWSTR, LPD3DXPRTCOMPBUFFER);
720 #define D3DXSavePRTCompBufferToFile WINELIB_NAME_AW(D3DXSavePRTCompBufferToFile)
721 UINT    WINAPI D3DXGetDeclLength(const D3DVERTEXELEMENT9 *decl);
722 UINT    WINAPI D3DXGetDeclVertexSize(const D3DVERTEXELEMENT9 *decl, DWORD stream_idx);
723 UINT    WINAPI D3DXGetFVFVertexSize(DWORD);
724 BOOL    WINAPI D3DXBoxBoundProbe(CONST D3DXVECTOR3 *, CONST D3DXVECTOR3 *, CONST D3DXVECTOR3 *, CONST D3DXVECTOR3 *);
725 BOOL    WINAPI D3DXSphereBoundProbe(CONST D3DXVECTOR3 *,FLOAT,CONST D3DXVECTOR3 *,CONST D3DXVECTOR3 *);
726 HRESULT WINAPI D3DXCleanMesh(D3DXCLEANTYPE, LPD3DXMESH, CONST DWORD *, LPD3DXMESH *, DWORD *, LPD3DXBUFFER *);
727 HRESULT WINAPI D3DXConcatenateMeshes(LPD3DXMESH *, UINT, DWORD, CONST D3DXMATRIX *, CONST D3DXMATRIX *, CONST D3DVERTEXELEMENT9 *, LPDIRECT3DDEVICE9, LPD3DXMESH *);
728 HRESULT WINAPI D3DXComputeBoundingBox(CONST D3DXVECTOR3 *, DWORD, DWORD, D3DXVECTOR3 *, D3DXVECTOR3 *);
729 HRESULT WINAPI D3DXComputeBoundingSphere(CONST D3DXVECTOR3 *, DWORD, DWORD, D3DXVECTOR3 *, FLOAT *);
730 HRESULT WINAPI D3DXComputeIMTFromPerTexelSignal(LPD3DXMESH, DWORD, FLOAT *, UINT, UINT, UINT, UINT, DWORD, LPD3DXUVATLASCB, LPVOID, LPD3DXBUFFER *);
731 HRESULT WINAPI D3DXComputeIMTFromPerVertexSignal(LPD3DXMESH, CONST FLOAT *, UINT, UINT, DWORD, LPD3DXUVATLASCB, LPVOID, LPD3DXBUFFER *);
732 HRESULT WINAPI D3DXComputeIMTFromSignal(LPD3DXMESH, DWORD, UINT, FLOAT, DWORD, LPD3DXIMTSIGNALCALLBACK, VOID *, LPD3DXUVATLASCB, LPVOID, LPD3DXBUFFER *);
733 HRESULT WINAPI D3DXComputeIMTFromTexture(LPD3DXMESH, LPDIRECT3DTEXTURE9, DWORD, DWORD, LPD3DXUVATLASCB, LPVOID, LPD3DXBUFFER *);
734 HRESULT WINAPI D3DXComputeNormals(LPD3DXBASEMESH, CONST DWORD *);
735 HRESULT WINAPI D3DXComputeTangentFrameEx(LPD3DXMESH, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, CONST DWORD *, FLOAT, FLOAT, FLOAT, LPD3DXMESH *, LPD3DXBUFFER *);
736 HRESULT WINAPI D3DXComputeTangent(LPD3DXMESH, DWORD, DWORD, DWORD, DWORD, CONST DWORD *);
737 HRESULT WINAPI D3DXConvertMeshSubsetToSingleStrip(LPD3DXBASEMESH, DWORD, DWORD, LPDIRECT3DINDEXBUFFER9 *, DWORD *);
738 HRESULT WINAPI D3DXConvertMeshSubsetToStrips(LPD3DXBASEMESH, DWORD, DWORD, LPDIRECT3DINDEXBUFFER9, DWORD *, LPD3DXBUFFER *, DWORD *);
739 HRESULT WINAPI D3DXDeclaratorFromFVF(DWORD, D3DVERTEXELEMENT9[MAX_FVF_DECL_SIZE]);
740 HRESULT WINAPI D3DXFVFFromDeclarator(const D3DVERTEXELEMENT9 *decl, DWORD *fvf);
741 HRESULT WINAPI D3DXGenerateOutputDecl(D3DVERTEXELEMENT9 *, CONST D3DVERTEXELEMENT9 *);
742 HRESULT WINAPI D3DXGeneratePMesh(LPD3DXMESH, CONST DWORD *, CONST D3DXATTRIBUTEWEIGHTS *, CONST FLOAT *, DWORD, DWORD, LPD3DXPMESH *);
743 HRESULT WINAPI D3DXIntersect(LPD3DXBASEMESH, CONST D3DXVECTOR3 *, CONST D3DXVECTOR3 *, BOOL *, DWORD *, FLOAT *, FLOAT *, FLOAT *, LPD3DXBUFFER *, DWORD *);
744 HRESULT WINAPI D3DXIntersectSubset(LPD3DXBASEMESH, DWORD, CONST D3DXVECTOR3 *, CONST D3DXVECTOR3 *, BOOL *, DWORD *, FLOAT *, FLOAT *, FLOAT *, LPD3DXBUFFER *, DWORD *);
745 BOOL    WINAPI D3DXIntersectTri(CONST D3DXVECTOR3 *, CONST D3DXVECTOR3 *, CONST D3DXVECTOR3 *, CONST D3DXVECTOR3 *, CONST D3DXVECTOR3*, FLOAT *, FLOAT *, FLOAT *);
746 HRESULT WINAPI D3DXOptimizeFaces(LPCVOID, UINT, UINT, BOOL, DWORD *);
747 HRESULT WINAPI D3DXOptimizeVertices(LPCVOID, UINT, UINT, BOOL, DWORD *);
748 HRESULT WINAPI D3DXRectPatchSize(CONST FLOAT *, DWORD *, DWORD *);
749 HRESULT WINAPI D3DXSHPRTCompSuperCluster(UINT *, LPD3DXMESH, UINT, UINT, UINT *, UINT *);
750 HRESULT WINAPI D3DXSHPRTCompSplitMeshSC(UINT *, UINT, UINT, UINT *, UINT, LPVOID, BOOL, UINT, LPD3DXBUFFER *, UINT *, BOOL, LPD3DXBUFFER *, LPD3DXBUFFER *, UINT *, UINT *, D3DXSHPRTSPLITMESHCLUSTERDATA *);
751 HRESULT WINAPI D3DXSimplifyMesh(LPD3DXMESH, CONST DWORD *, CONST D3DXATTRIBUTEWEIGHTS, CONST FLOAT *, DWORD, DWORD, LPD3DXMESH *);
752 HRESULT WINAPI D3DXSplitMesh(LPD3DXMESH, CONST DWORD *, CONST DWORD, CONST DWORD, DWORD *, LPD3DXBUFFER *, LPD3DXBUFFER *, LPD3DXBUFFER *, LPD3DXBUFFER *);
753 HRESULT WINAPI D3DXTesselateNPatches(LPD3DXMESH, CONST DWORD *, FLOAT, BOOL, LPD3DXMESH *, LPD3DXBUFFER *);
754 HRESULT WINAPI D3DXTesselateRectPatch(LPDIRECT3DVERTEXBUFFER9, CONST FLOAT *, CONST D3DVERTEXELEMENT9 *, CONST D3DRECTPATCH_INFO *, LPD3DXMESH);
755 HRESULT WINAPI D3DXTesselateTriPatch(LPDIRECT3DVERTEXBUFFER9, CONST FLOAT *, CONST D3DVERTEXELEMENT9 *, CONST D3DTRIPATCH_INFO *, LPD3DXMESH);
756 HRESULT WINAPI D3DXTriPatchSize(CONST FLOAT *, DWORD *, DWORD *);
757 HRESULT WINAPI D3DXUVAtlasCreate(LPD3DXMESH, UINT, FLOAT, UINT, UINT, FLOAT, DWORD, CONST DWORD *, CONST FLOAT *, LPD3DXUVATLASCB, FLOAT, LPVOID, DWORD, LPD3DXMESH *, LPD3DXBUFFER *, LPD3DXBUFFER *, FLOAT *, UINT *);
758 HRESULT WINAPI D3DXUVAtlasPack(ID3DXMesh *, UINT, UINT, FLOAT, DWORD, CONST DWORD *, LPD3DXUVATLASCB, FLOAT, LPVOID, DWORD, LPD3DXBUFFER);
759 HRESULT WINAPI D3DXUVAtlasPartition(LPD3DXMESH, UINT, FLOAT, DWORD, CONST DWORD *, CONST DWORD *, CONST FLOAT *, LPD3DXUVATLASCB, FLOAT, LPVOID, DWORD, LPD3DXMESH *, LPD3DXBUFFER *, LPD3DXBUFFER *, LPD3DXBUFFER *, FLOAT *, UINT *);
760 HRESULT WINAPI D3DXValidMesh(LPD3DXMESH, CONST DWORD *, LPD3DXBUFFER *);
761 HRESULT WINAPI D3DXValidPatchMesh(LPD3DXPATCHMESH, DWORD *, DWORD *, LPD3DXBUFFER *);
762 HRESULT WINAPI D3DXWeldVertices(LPD3DXMESH, DWORD, CONST D3DXWELDEPSILONS *, CONST DWORD *, DWORD *, DWORD *, LPD3DXBUFFER *);
763
764 #ifdef __cplusplus
765 }
766 #endif
767
768 DEFINE_GUID(DXFILEOBJ_XSkinMeshHeader,          0x3cf169ce, 0xff7c, 0x44ab, 0x93, 0xc0, 0xf7, 0x8f, 0x62, 0xd1, 0x72, 0xe2);
769 DEFINE_GUID(DXFILEOBJ_VertexDuplicationIndices, 0xb8d65549, 0xd7c9, 0x4995, 0x89, 0xcf, 0x53, 0xa9, 0xa8, 0xb0, 0x31, 0xe3);
770 DEFINE_GUID(DXFILEOBJ_FaceAdjacency,            0xa64c844a, 0xe282, 0x4756, 0x8b, 0x80, 0x25, 0x0c, 0xde, 0x04, 0x39, 0x8c);
771 DEFINE_GUID(DXFILEOBJ_SkinWeights,              0x6f0d123b, 0xbad2, 0x4167, 0xa0, 0xd0, 0x80, 0x22, 0x4f, 0x25, 0xfa, 0xbb);
772 DEFINE_GUID(DXFILEOBJ_Patch,                    0xa3eb5d44, 0xfc22, 0x429d, 0x9a, 0xfb, 0x32, 0x21, 0xcb, 0x97, 0x19, 0xa6);
773 DEFINE_GUID(DXFILEOBJ_PatchMesh,                0xd02c95cc, 0xedba, 0x4305, 0x9b, 0x5d, 0x18, 0x20, 0xd7, 0x70, 0x4d, 0xbf);
774 DEFINE_GUID(DXFILEOBJ_PatchMesh9,               0xb9ec94e1, 0xb9a6, 0x4251, 0xba, 0x18, 0x94, 0x89, 0x3f, 0x02, 0xc0, 0xea);
775 DEFINE_GUID(DXFILEOBJ_PMInfo,                   0xb6c3e656, 0xec8b, 0x4b92, 0x9b, 0x62, 0x68, 0x16, 0x59, 0x52, 0x29, 0x47);
776 DEFINE_GUID(DXFILEOBJ_PMAttributeRange,         0x917e0427, 0xc61e, 0x4a14, 0x9c, 0x64, 0xaf, 0xe6, 0x5f, 0x9e, 0x98, 0x44);
777 DEFINE_GUID(DXFILEOBJ_PMVSplitRecord,           0x574ccc14, 0xf0b3, 0x4333, 0x82, 0x2d, 0x93, 0xe8, 0xa8, 0xa0, 0x8e, 0x4c);
778 DEFINE_GUID(DXFILEOBJ_FVFData,                  0xb6e70a0e, 0x8ef9, 0x4e83, 0x94, 0xad, 0xec, 0xc8, 0xb0, 0xc0, 0x48, 0x97);
779 DEFINE_GUID(DXFILEOBJ_VertexElement,            0xf752461c, 0x1e23, 0x48f6, 0xb9, 0xf8, 0x83, 0x50, 0x85, 0x0f, 0x33, 0x6f);
780 DEFINE_GUID(DXFILEOBJ_DeclData,                 0xbf22e553, 0x292c, 0x4781, 0x9f, 0xea, 0x62, 0xbd, 0x55, 0x4b, 0xdd, 0x93);
781 DEFINE_GUID(DXFILEOBJ_EffectFloats,             0xf1cfe2b3, 0x0de3, 0x4e28, 0xaf, 0xa1, 0x15, 0x5a, 0x75, 0x0a, 0x28, 0x2d);
782 DEFINE_GUID(DXFILEOBJ_EffectString,             0xd55b097e, 0xbdb6, 0x4c52, 0xb0, 0x3d, 0x60, 0x51, 0xc8, 0x9d, 0x0e, 0x42);
783 DEFINE_GUID(DXFILEOBJ_EffectDWord,              0x622c0ed0, 0x956e, 0x4da9, 0x90, 0x8a, 0x2a, 0xf9, 0x4f, 0x3c, 0xe7, 0x16);
784 DEFINE_GUID(DXFILEOBJ_EffectParamFloats,        0x3014b9a0, 0x62f5, 0x478c, 0x9b, 0x86, 0xe4, 0xac, 0x9f, 0x4e, 0x41, 0x8b);
785 DEFINE_GUID(DXFILEOBJ_EffectParamString,        0x1dbc4c88, 0x94c1, 0x46ee, 0x90, 0x76, 0x2c, 0x28, 0x81, 0x8c, 0x94, 0x81);
786 DEFINE_GUID(DXFILEOBJ_EffectParamDWord,         0xe13963bc, 0xae51, 0x4c5d, 0xb0, 0x0f, 0xcf, 0xa3, 0xa9, 0xd9, 0x7c, 0xe5);
787 DEFINE_GUID(DXFILEOBJ_EffectInstance,           0xe331f7e4, 0x0559, 0x4cc2, 0x8e, 0x99, 0x1c, 0xec, 0x16, 0x57, 0x92, 0x8f);
788 DEFINE_GUID(DXFILEOBJ_AnimTicksPerSecond,       0x9e415a43, 0x7ba6, 0x4a73, 0x87, 0x43, 0xb7, 0x3d, 0x47, 0xe8, 0x84, 0x76);
789 DEFINE_GUID(DXFILEOBJ_CompressedAnimationSet,   0x7f9b00b3, 0xf125, 0x4890, 0x87, 0x6e, 0x1c, 0x42, 0xbf, 0x69, 0x7c, 0x4d);
790
791 #define XSKINEXP_TEMPLATES \
792         "xof 0303txt 0032\
793         template XSkinMeshHeader \
794         { \
795             <3CF169CE-FF7C-44ab-93C0-F78F62D172E2> \
796             WORD nMaxSkinWeightsPerVertex; \
797             WORD nMaxSkinWeightsPerFace; \
798             WORD nBones; \
799         } \
800         template VertexDuplicationIndices \
801         { \
802             <B8D65549-D7C9-4995-89CF-53A9A8B031E3> \
803             DWORD nIndices; \
804             DWORD nOriginalVertices; \
805             array DWORD indices[nIndices]; \
806         } \
807         template FaceAdjacency \
808         { \
809             <A64C844A-E282-4756-8B80-250CDE04398C> \
810             DWORD nIndices; \
811             array DWORD indices[nIndices]; \
812         } \
813         template SkinWeights \
814         { \
815             <6F0D123B-BAD2-4167-A0D0-80224F25FABB> \
816             STRING transformNodeName; \
817             DWORD nWeights; \
818             array DWORD vertexIndices[nWeights]; \
819             array float weights[nWeights]; \
820             Matrix4x4 matrixOffset; \
821         } \
822         template Patch \
823         { \
824             <A3EB5D44-FC22-429D-9AFB-3221CB9719A6> \
825             DWORD nControlIndices; \
826             array DWORD controlIndices[nControlIndices]; \
827         } \
828         template PatchMesh \
829         { \
830             <D02C95CC-EDBA-4305-9B5D-1820D7704BBF> \
831             DWORD nVertices; \
832             array Vector vertices[nVertices]; \
833             DWORD nPatches; \
834             array Patch patches[nPatches]; \
835             [ ... ] \
836         } \
837         template PatchMesh9 \
838         { \
839             <B9EC94E1-B9A6-4251-BA18-94893F02C0EA> \
840             DWORD Type; \
841             DWORD Degree; \
842             DWORD Basis; \
843             DWORD nVertices; \
844             array Vector vertices[nVertices]; \
845             DWORD nPatches; \
846             array Patch patches[nPatches]; \
847             [ ... ] \
848         } template EffectFloats \
849         { \
850             <F1CFE2B3-0DE3-4e28-AFA1-155A750A282D> \
851             DWORD nFloats; \
852             array float Floats[nFloats]; \
853         } \
854         template EffectString \
855         { \
856             <D55B097E-BDB6-4c52-B03D-6051C89D0E42> \
857             STRING Value; \
858         } \
859         template EffectDWord \
860         { \
861             <622C0ED0-956E-4da9-908A-2AF94F3CE716> \
862             DWORD Value; \
863         } template EffectParamFloats \
864         { \
865             <3014B9A0-62F5-478c-9B86-E4AC9F4E418B> \
866             STRING ParamName; \
867             DWORD nFloats; \
868             array float Floats[nFloats]; \
869         } template EffectParamString \
870         { \
871             <1DBC4C88-94C1-46ee-9076-2C28818C9481> \
872             STRING ParamName; \
873             STRING Value; \
874         } \
875         template EffectParamDWord \
876         { \
877             <E13963BC-AE51-4c5d-B00F-CFA3A9D97CE5> \
878             STRING ParamName; \
879             DWORD Value; \
880         } \
881         template EffectInstance \
882         { \
883             <E331F7E4-0559-4cc2-8E99-1CEC1657928F> \
884             STRING EffectFilename; \
885             [ ... ] \
886         } template AnimTicksPerSecond \
887         { \
888             <9E415A43-7BA6-4a73-8743-B73D47E88476> \
889             DWORD AnimTicksPerSecond; \
890         } \
891         template CompressedAnimationSet \
892         { \
893             <7F9B00B3-F125-4890-876E-1C42BF697C4D> \
894             DWORD CompressedBlockSize; \
895             FLOAT TicksPerSec; \
896             DWORD PlaybackType; \
897             DWORD BufferLength; \
898             array DWORD CompressedData[BufferLength]; \
899         } "
900
901 #define XEXTENSIONS_TEMPLATES \
902         "xof 0303txt 0032\
903         template FVFData \
904         { \
905             <B6E70A0E-8EF9-4e83-94AD-ECC8B0C04897> \
906             DWORD dwFVF; \
907             DWORD nDWords; \
908             array DWORD data[nDWords]; \
909         } \
910         template VertexElement \
911         { \
912             <F752461C-1E23-48f6-B9F8-8350850F336F> \
913             DWORD Type; \
914             DWORD Method; \
915             DWORD Usage; \
916             DWORD UsageIndex; \
917         } \
918         template DeclData \
919         { \
920             <BF22E553-292C-4781-9FEA-62BD554BDD93> \
921             DWORD nElements; \
922             array VertexElement Elements[nElements]; \
923             DWORD nDWords; \
924             array DWORD data[nDWords]; \
925         } \
926         template PMAttributeRange \
927         { \
928             <917E0427-C61E-4a14-9C64-AFE65F9E9844> \
929             DWORD iFaceOffset; \
930             DWORD nFacesMin; \
931             DWORD nFacesMax; \
932             DWORD iVertexOffset; \
933             DWORD nVerticesMin; \
934             DWORD nVerticesMax; \
935         } \
936         template PMVSplitRecord \
937         { \
938             <574CCC14-F0B3-4333-822D-93E8A8A08E4C> \
939             DWORD iFaceCLW; \
940             DWORD iVlrOffset; \
941             DWORD iCode; \
942         } \
943         template PMInfo \
944         { \
945             <B6C3E656-EC8B-4b92-9B62-681659522947> \
946             DWORD nAttributes; \
947             array PMAttributeRange attributeRanges[nAttributes]; \
948             DWORD nMaxValence; \
949             DWORD nMinLogicalVertices; \
950             DWORD nMaxLogicalVertices; \
951             DWORD nVSplits; \
952             array PMVSplitRecord splitRecords[nVSplits]; \
953             DWORD nAttributeMispredicts; \
954             array DWORD attributeMispredicts[nAttributeMispredicts]; \
955         } "
956
957 #endif /* __WINE_D3DX9MESH_H */