winhttp: Make strings in WINHTTP_PROXY_INFO non-const.
[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_ORTHOGONALIZE_FROM_V =    0x0010,
117     D3DXTANGENT_ORTHOGONALIZE_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 #undef INTERFACE
338
339 #define INTERFACE ID3DXMesh
340 DECLARE_INTERFACE_(ID3DXMesh, ID3DXBaseMesh)
341 {
342     /*** IUnknown methods ***/
343     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID* object) PURE;
344     STDMETHOD_(ULONG, AddRef)(THIS) PURE;
345     STDMETHOD_(ULONG, Release)(THIS) PURE;
346     /*** ID3DXBaseMesh ***/
347     STDMETHOD(DrawSubset)(THIS_ DWORD attrib_id) PURE;
348     STDMETHOD_(DWORD, GetNumFaces)(THIS) PURE;
349     STDMETHOD_(DWORD, GetNumVertices)(THIS) PURE;
350     STDMETHOD_(DWORD, GetFVF)(THIS) PURE;
351     STDMETHOD(GetDeclaration)(THIS_ D3DVERTEXELEMENT9 declaration[MAX_FVF_DECL_SIZE]) PURE;
352     STDMETHOD_(DWORD, GetNumBytesPerVertex)(THIS) PURE;
353     STDMETHOD_(DWORD, GetOptions)(THIS) PURE;
354     STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE9* device) PURE;
355     STDMETHOD(CloneMeshFVF)(THIS_ DWORD options, DWORD fvf, LPDIRECT3DDEVICE9 device, LPD3DXMESH* clone_mesh) PURE;
356     STDMETHOD(CloneMesh)(THIS_ DWORD options, CONST D3DVERTEXELEMENT9* declaration, LPDIRECT3DDEVICE9 device,
357         LPD3DXMESH* clone_mesh) PURE;
358     STDMETHOD(GetVertexBuffer)(THIS_ LPDIRECT3DVERTEXBUFFER9* vertex_buffer) PURE;
359     STDMETHOD(GetIndexBuffer)(THIS_ LPDIRECT3DINDEXBUFFER9* index_buffer) PURE;
360     STDMETHOD(LockVertexBuffer)(THIS_ DWORD flags, LPVOID* data) PURE;
361     STDMETHOD(UnlockVertexBuffer)(THIS) PURE;
362     STDMETHOD(LockIndexBuffer)(THIS_ DWORD flags, LPVOID* data) PURE;
363     STDMETHOD(UnlockIndexBuffer)(THIS) PURE;
364     STDMETHOD(GetAttributeTable)(THIS_ D3DXATTRIBUTERANGE* attrib_table, DWORD* attrib_table_size) PURE;
365     STDMETHOD(ConvertPointRepsToAdjacency)(THIS_ CONST DWORD* point_reps, DWORD* adjacency) PURE;
366     STDMETHOD(ConvertAdjacencyToPointReps)(THIS_ CONST DWORD* adjacency, DWORD* point_reps) PURE;
367     STDMETHOD(GenerateAdjacency)(THIS_ FLOAT epsilon, DWORD* adjacency) PURE;
368     STDMETHOD(UpdateSemantics)(THIS_ D3DVERTEXELEMENT9 declaration[MAX_FVF_DECL_SIZE]) PURE;
369     /*** ID3DXMesh ***/
370     STDMETHOD(LockAttributeBuffer)(THIS_ DWORD flags, DWORD** data) PURE;
371     STDMETHOD(UnlockAttributeBuffer)(THIS) PURE;
372     STDMETHOD(Optimize)(THIS_ DWORD flags, CONST DWORD* adjacency_in, DWORD* adjacency_out,
373         DWORD* face_remap, LPD3DXBUFFER* vertex_remap, LPD3DXMESH* opt_mesh) PURE;
374     STDMETHOD(OptimizeInplace)(THIS_ DWORD flags, CONST DWORD* adjacency_in, DWORD* adjacency_out,
375                      DWORD* face_remap, LPD3DXBUFFER* vertex_remap) PURE;
376     STDMETHOD(SetAttributeTable)(THIS_ CONST D3DXATTRIBUTERANGE* attrib_table, DWORD attrib_table_size) PURE;
377 };
378 #undef INTERFACE
379
380 #define INTERFACE ID3DXPMesh
381 DECLARE_INTERFACE_(ID3DXPMesh, ID3DXBaseMesh)
382 {
383     /*** IUnknown methods ***/
384     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID* object) PURE;
385     STDMETHOD_(ULONG, AddRef)(THIS) PURE;
386     STDMETHOD_(ULONG, Release)(THIS) PURE;
387     /*** ID3DXBaseMesh ***/
388     STDMETHOD(DrawSubset)(THIS_ DWORD attrib_id) PURE;
389     STDMETHOD_(DWORD, GetNumFaces)(THIS) PURE;
390     STDMETHOD_(DWORD, GetNumVertices)(THIS) PURE;
391     STDMETHOD_(DWORD, GetFVF)(THIS) PURE;
392     STDMETHOD(GetDeclaration)(THIS_ D3DVERTEXELEMENT9 declaration[MAX_FVF_DECL_SIZE]) PURE;
393     STDMETHOD_(DWORD, GetNumBytesPerVertex)(THIS) PURE;
394     STDMETHOD_(DWORD, GetOptions)(THIS) PURE;
395     STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE9* device) PURE;
396     STDMETHOD(CloneMeshFVF)(THIS_ DWORD options, DWORD fvf, LPDIRECT3DDEVICE9 device, LPD3DXMESH* clone_mesh) PURE;
397     STDMETHOD(CloneMesh)(THIS_ DWORD options, CONST D3DVERTEXELEMENT9* declaration, LPDIRECT3DDEVICE9 device,
398         LPD3DXMESH* clone_mesh) PURE;
399     STDMETHOD(GetVertexBuffer)(THIS_ LPDIRECT3DVERTEXBUFFER9* vertex_buffer) PURE;
400     STDMETHOD(GetIndexBuffer)(THIS_ LPDIRECT3DINDEXBUFFER9* index_buffer) PURE;
401     STDMETHOD(LockVertexBuffer)(THIS_ DWORD flags, LPVOID* data) PURE;
402     STDMETHOD(UnlockVertexBuffer)(THIS) PURE;
403     STDMETHOD(LockIndexBuffer)(THIS_ DWORD flags, LPVOID* data) PURE;
404     STDMETHOD(UnlockIndexBuffer)(THIS) PURE;
405     STDMETHOD(GetAttributeTable)(THIS_ D3DXATTRIBUTERANGE* attrib_table, DWORD* attrib_table_size) PURE;
406     STDMETHOD(ConvertPointRepsToAdjacency)(THIS_ CONST DWORD* point_reps, DWORD* adjacency) PURE;
407     STDMETHOD(ConvertAdjacencyToPointReps)(THIS_ CONST DWORD* adjacency, DWORD* point_reps) PURE;
408     STDMETHOD(GenerateAdjacency)(THIS_ FLOAT epsilon, DWORD* adjacency) PURE;
409     STDMETHOD(UpdateSemantics)(THIS_ D3DVERTEXELEMENT9 declaration[MAX_FVF_DECL_SIZE]) PURE;
410     /*** ID3DXPMesh ***/
411     STDMETHOD(ClonePMeshFVF)(THIS_ DWORD options, DWORD fvf, LPDIRECT3DDEVICE9 device, LPD3DXPMESH* clone_mesh) PURE;
412     STDMETHOD(ClonePMesh)(THIS_ DWORD options, CONST D3DVERTEXELEMENT9* declaration, LPDIRECT3DDEVICE9 device,
413         LPD3DXPMESH* clone_mesh) PURE;
414     STDMETHOD(SetNumFaces)(THIS_ DWORD faces) PURE;
415     STDMETHOD(SetNumVertices)(THIS_ DWORD vertices) PURE;
416     STDMETHOD_(DWORD, GetMaxFaces)(THIS) PURE;
417     STDMETHOD_(DWORD, GetMinFaces)(THIS) PURE;
418     STDMETHOD_(DWORD, GetMaxVertices)(THIS) PURE;
419     STDMETHOD_(DWORD, GetMinVertices)(THIS) PURE;
420     STDMETHOD(Save)(THIS_ IStream *stream, CONST D3DXMATERIAL* material, CONST D3DXEFFECTINSTANCE* effect_instance, DWORD num_materials) PURE;
421     STDMETHOD(Optimize)(THIS_ DWORD flags, DWORD* adjacency_out, DWORD* face_remap,
422         LPD3DXBUFFER* vertex_remap, LPD3DXMESH* opt_mesh) PURE;
423     STDMETHOD(OptimizeBaseLOD)(THIS_ DWORD flags, DWORD* face_remap) PURE;
424     STDMETHOD(TrimByFaces)(THIS_ DWORD new_faces_min, DWORD new_faces_max, DWORD* face_remap, DWORD* vertex_remap) PURE;
425     STDMETHOD(TrimByVertices)(THIS_ DWORD new_vertices_min, DWORD new_vertices_max, DWORD* face_remap, DWORD* vertex_remap) PURE;
426     STDMETHOD(GetAdjacency)(THIS_ DWORD* adjacency) PURE;
427     STDMETHOD(GenerateVertexHistory)(THIS_ DWORD* vertex_history) PURE;
428 };
429 #undef INTERFACE
430
431 #define INTERFACE ID3DXSPMesh
432 DECLARE_INTERFACE_(ID3DXSPMesh, IUnknown)
433 {
434     /*** IUnknown methods ***/
435     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID* object) PURE;
436     STDMETHOD_(ULONG, AddRef)(THIS) PURE;
437     STDMETHOD_(ULONG, Release)(THIS) PURE;
438     /*** ID3DXSPMesh ***/
439     STDMETHOD_(DWORD, GetNumFaces)(THIS) PURE;
440     STDMETHOD_(DWORD, GetNumVertices)(THIS) PURE;
441     STDMETHOD_(DWORD, GetNumFVF)(THIS) PURE;
442     STDMETHOD(GetDeclaration)(THIS_ D3DVERTEXELEMENT9 declaration[MAX_FVF_DECL_SIZE]) PURE;
443     STDMETHOD_(DWORD, GetOptions)(THIS) PURE;
444     STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE9* device) PURE;
445     STDMETHOD(CloneMeshFVF)(THIS_ DWORD options, DWORD fvf, LPDIRECT3DDEVICE9 device, DWORD* adjacency_out,
446         DWORD* vertex_remap_out, LPD3DXMESH* clone_mesh) PURE;
447     STDMETHOD(CloneMesh)(THIS_ DWORD options, CONST D3DVERTEXELEMENT9* declaration, LPDIRECT3DDEVICE9 device,
448         DWORD* adjacency_out, DWORD* vertex_remap_out, LPD3DXMESH* clone_mesh) PURE;
449     STDMETHOD(ClonePMeshFVF)(THIS_ DWORD options, DWORD fvf, LPDIRECT3DDEVICE9 device, DWORD* vertex_remap_out,
450         FLOAT* errors_by_face, LPD3DXPMESH* clone_mesh) PURE;
451     STDMETHOD(ClonePMesh)(THIS_ DWORD options, CONST D3DVERTEXELEMENT9* declaration, LPDIRECT3DDEVICE9 device,
452         DWORD* vertex_remap_out, FLOAT* errors_by_face, LPD3DXPMESH* clone_mesh) PURE;
453     STDMETHOD(ReduceFaces)(THIS_ DWORD faces) PURE;
454     STDMETHOD(ReduceVertices)(THIS_ DWORD vertices) PURE;
455     STDMETHOD_(DWORD, GetMaxFaces)(THIS) PURE;
456     STDMETHOD_(DWORD, GetMaxVertices)(THIS) PURE;
457     STDMETHOD(GetVertexAttributeWeights)(THIS_ LPD3DXATTRIBUTEWEIGHTS vertex_attribute_weights) PURE;
458     STDMETHOD(GetVertexWeights)(THIS_ FLOAT* vertex_weights) PURE;
459 };
460 #undef INTERFACE
461
462 #define INTERFACE ID3DXPatchMesh
463 DECLARE_INTERFACE_(ID3DXPatchMesh, IUnknown)
464 {
465     /*** IUnknown methods ***/
466     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID* object) PURE;
467     STDMETHOD_(ULONG, AddRef)(THIS) PURE;
468     STDMETHOD_(ULONG, Release)(THIS) PURE;
469     /*** ID3DXPatchMesh ***/
470     STDMETHOD_(DWORD, GetNumPatches)(THIS) PURE;
471     STDMETHOD_(DWORD, GetNumVertices)(THIS) PURE;
472     STDMETHOD(GetDeclaration)(THIS_ D3DVERTEXELEMENT9 declaration[MAX_FVF_DECL_SIZE]) PURE;
473     STDMETHOD_(DWORD, GetControlVerticesPerPatch)(THIS) PURE;
474     STDMETHOD_(DWORD, GetOptions)(THIS) PURE;
475     STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE9* device) PURE;
476     STDMETHOD(GetPatchInfo)(THIS_ LPD3DXPATCHINFO patch_info) PURE;
477     STDMETHOD(GetVertexBuffer)(THIS_ LPDIRECT3DVERTEXBUFFER9* vertex_buffer) PURE;
478     STDMETHOD(GetIndexBuffer)(THIS_ LPDIRECT3DINDEXBUFFER9* index_buffer) PURE;
479     STDMETHOD(LockVertexBuffer)(THIS_ DWORD flags, LPVOID* data) PURE;
480     STDMETHOD(UnlockVertexBuffer)(THIS) PURE;
481     STDMETHOD(LockIndexBuffer)(THIS_ DWORD flags, LPVOID* data) PURE;
482     STDMETHOD(UnlockIndexBuffer)(THIS) PURE;
483     STDMETHOD(LockAttributeBuffer)(THIS_ DWORD flags, DWORD** data) PURE;
484     STDMETHOD(UnlockAttributeBuffer)(THIS) PURE;
485     STDMETHOD(GetTessSize)(THIS_ FLOAT tess_level, DWORD adaptive, DWORD* num_triangles, DWORD* num_vertices) PURE;
486     STDMETHOD(GenerateAdjacency)(THIS_ FLOAT tolerance) PURE;
487     STDMETHOD(CloneMesh)(THIS_ DWORD options, CONST D3DVERTEXELEMENT9* declaration, LPD3DXPATCHMESH *clone_mesh) PURE;
488     STDMETHOD(Optimize)(THIS_ DWORD flags) PURE;
489     STDMETHOD(SetDisplaceParam)(THIS_ LPDIRECT3DBASETEXTURE9 texture, D3DTEXTUREFILTERTYPE min_filter,
490         D3DTEXTUREFILTERTYPE mag_filter, D3DTEXTUREFILTERTYPE mip_filter, D3DTEXTUREADDRESS wrap, DWORD lod_bias) PURE;
491     STDMETHOD(GetDisplaceParam)(THIS_ LPDIRECT3DBASETEXTURE9* texture, D3DTEXTUREFILTERTYPE* min_filter,
492         D3DTEXTUREFILTERTYPE* mag_filter, D3DTEXTUREFILTERTYPE* mip_filter, D3DTEXTUREADDRESS* wrap, DWORD* lod_bias) PURE;
493     STDMETHOD(Tessellate)(THIS_ FLOAT tess_level, LPD3DXMESH mesh) PURE;
494     STDMETHOD(TessellateAdaptive)(THIS_ CONST D3DXVECTOR4* trans, DWORD max_tess_level, DWORD min_tess_level, LPD3DXMESH mesh) PURE;
495 };
496 #undef INTERFACE
497
498 #define INTERFACE ID3DXSkinInfo
499 DECLARE_INTERFACE_(ID3DXSkinInfo, IUnknown)
500 {
501     /*** IUnknown methods ***/
502     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID* object) PURE;
503     STDMETHOD_(ULONG, AddRef)(THIS) PURE;
504     STDMETHOD_(ULONG, Release)(THIS) PURE;
505     /*** ID3DXSkinInfo ***/
506     STDMETHOD(SetBoneInfluence)(THIS_ DWORD bone, DWORD num_influences, CONST DWORD* vertices, CONST FLOAT* weights) PURE;
507     STDMETHOD(SetBoneVertexInfluence)(THIS_ DWORD bone_num, DWORD influence_num, float weight) PURE;
508     STDMETHOD_(DWORD, GetNumBoneInfluences)(THIS_ DWORD bone) PURE;
509     STDMETHOD(GetBoneInfluence)(THIS_ DWORD bone, DWORD* vertices, FLOAT* weights) PURE;
510     STDMETHOD(GetBoneVertexInfluence)(THIS_ DWORD bone_num, DWORD influence_num, float *weight, DWORD* vertex_num) PURE;
511     STDMETHOD(GetMaxVertexInfluences)(THIS_ DWORD* max_vertex_influences) PURE;
512     STDMETHOD_(DWORD, GetNumBones)(THIS) PURE;
513     STDMETHOD(FindBoneVertexInfluenceIndex)(THIS_ DWORD bone_num, DWORD vertex_num, DWORD* influence_index) PURE;
514     STDMETHOD(GetMaxFaceInfluences)(THIS_ LPDIRECT3DINDEXBUFFER9 index_buffer, DWORD num_faces, DWORD* max_face_influences) PURE;
515     STDMETHOD(SetMinBoneInfluence)(THIS_ FLOAT min_influence) PURE;
516     STDMETHOD_(FLOAT, GetMinBoneInfluence)(THIS) PURE;
517     STDMETHOD(SetBoneName)(THIS_ DWORD bone, LPCSTR name) PURE;
518     STDMETHOD_(LPCSTR, GetBoneName)(THIS_ DWORD bone) PURE;
519     STDMETHOD(SetBoneOffsetMatrix)(THIS_ DWORD bone, CONST D3DXMATRIX* bone_transform) PURE;
520     STDMETHOD_(LPD3DXMATRIX, GetBoneOffsetMatrix)(THIS_ DWORD bone) PURE;
521     STDMETHOD(Clone)(THIS_ LPD3DXSKININFO* skin_info) PURE;
522     STDMETHOD(Remap)(THIS_ DWORD num_vertices, DWORD* vertex_remap) PURE;
523     STDMETHOD(SetFVF)(THIS_ DWORD FVF) PURE;
524     STDMETHOD(SetDeclaration)(THIS_ CONST D3DVERTEXELEMENT9* declaration) PURE;
525     STDMETHOD_(DWORD, GetFVF)(THIS) PURE;
526     STDMETHOD(GetDeclaration)(THIS_ D3DVERTEXELEMENT9 declaration[MAX_FVF_DECL_SIZE]) PURE;
527     STDMETHOD(UpdateSkinnedMesh)(THIS_ CONST D3DXMATRIX* bone_transforms,
528         CONST D3DXMATRIX* bone_inv_transpose_transforms, LPCVOID vertices_src, PVOID vertices_dest) PURE;
529     STDMETHOD(ConvertToBlendedMesh)(THIS_ LPD3DXMESH mesh_in, DWORD options, CONST DWORD *adjacency_in,
530         LPDWORD adjacency_out, DWORD* face_remap, LPD3DXBUFFER* vertex_remap, DWORD* max_face_infl,
531         DWORD* num_bone_combinations, LPD3DXBUFFER* bone_combination_table, LPD3DXMESH* mesh_out) PURE;
532     STDMETHOD(ConvertToIndexedBlendedMesh)(THIS_ LPD3DXMESH mesh_in, DWORD options, CONST DWORD *adjacency_in,
533         LPDWORD adjacency_out, DWORD* face_remap, LPD3DXBUFFER* vertex_remap, DWORD* max_face_infl,
534         DWORD* num_bone_combinations, LPD3DXBUFFER* bone_combination_table, LPD3DXMESH* mesh_out) PURE;
535 };
536 #undef INTERFACE
537
538 #define INTERFACE ID3DXPRTBuffer
539 DECLARE_INTERFACE_(ID3DXPRTBuffer, IUnknown)
540 {
541     /*** IUnknown methods ***/
542     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID* object) PURE;
543     STDMETHOD_(ULONG, AddRef)(THIS) PURE;
544     STDMETHOD_(ULONG, Release)(THIS) PURE;
545     /*** ID3DXPRTBuffer methods ***/
546     STDMETHOD_(UINT, GetNumSamples)(THIS) PURE;
547     STDMETHOD_(UINT, GetNumCoeffs)(THIS) PURE;
548     STDMETHOD_(UINT, GetNumChannels)(THIS) PURE;
549     STDMETHOD_(BOOL, IsTexture)(THIS) PURE;
550     STDMETHOD_(BOOL, GetWidth)(THIS) PURE;
551     STDMETHOD_(BOOL, GetHeight)(THIS) PURE;
552     STDMETHOD(Resize)(THIS_ UINT new_size) PURE;
553     STDMETHOD(LockBuffer)(THIS_ UINT start, UINT num_samples, FLOAT **data) PURE;
554     STDMETHOD(UnlockBuffer)(THIS) PURE;
555     STDMETHOD(ScaleBuffer)(THIS_ FLOAT scale) PURE;
556     STDMETHOD(AddBuffer)(THIS_ LPD3DXPRTBUFFER buffer) PURE;
557     STDMETHOD(AttachGH)(THIS_ LPD3DXTEXTUREGUTTERHELPER) PURE;
558     STDMETHOD(ReleaseGH)(THIS) PURE;
559     STDMETHOD(EvalGH)(THIS) PURE;
560     STDMETHOD(ExtractTexture)(THIS_ UINT channel, UINT start_coefficient,
561         UINT num_coefficients, LPDIRECT3DTEXTURE9 texture) PURE;
562     STDMETHOD(ExtractToMesh)(THIS_ UINT num_coefficients, D3DDECLUSAGE usage,
563         UINT usage_index_start, LPD3DXMESH scene) PURE;
564 };
565 #undef INTERFACE
566
567 #define INTERFACE ID3DXPRTCompBuffer
568 DECLARE_INTERFACE_(ID3DXPRTCompBuffer, IUnknown)
569 {
570     /*** IUnknown methods ***/
571     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID* object) PURE;
572     STDMETHOD_(ULONG, AddRef)(THIS) PURE;
573     STDMETHOD_(ULONG, Release)(THIS) PURE;
574     /*** ID3DXPRTCompBuffer methods ***/
575     STDMETHOD_(UINT, GetNumSamples)(THIS) PURE;
576     STDMETHOD_(UINT, GetNumCoeffs)(THIS) PURE;
577     STDMETHOD_(UINT, GetNumChannels)(THIS) PURE;
578     STDMETHOD_(BOOL, IsTexture)(THIS) PURE;
579     STDMETHOD_(UINT, GetWidth)(THIS) PURE;
580     STDMETHOD_(UINT, GetHeight)(THIS) PURE;
581     STDMETHOD_(UINT, GetNumClusters)(THIS) PURE;
582     STDMETHOD_(UINT, GetNumPCA)(THIS) PURE;
583     STDMETHOD(NormalizeData)(THIS) PURE;
584     STDMETHOD(ExtractBasis)(THIS_ UINT cluster, FLOAT *cluster_basis) PURE;
585     STDMETHOD(ExtractClusterIDs)(THIS_ UINT *cluster_ids) PURE;
586     STDMETHOD(ExtractPCA)(THIS_ UINT start_pca, UINT num_extract, FLOAT *pca_coefficients) PURE;
587     STDMETHOD(ExtractTexture)(THIS_ UINT start_pca, UINT num_pca, LPDIRECT3DTEXTURE9 texture) PURE;
588     STDMETHOD(ExtractToMesh)(THIS_ UINT num_pca, D3DDECLUSAGE usage, UINT usage_index_start, LPD3DXMESH scene) PURE;
589 };
590 #undef INTERFACE
591
592 #define INTERFACE ID3DXTextureGutterHelper
593 DECLARE_INTERFACE_(ID3DXTextureGutterHelper, IUnknown)
594 {
595     /*** IUnknown methods ***/
596     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID* object) PURE;
597     STDMETHOD_(ULONG, AddRef)(THIS) PURE;
598     STDMETHOD_(ULONG, Release)(THIS) PURE;
599     /*** ID3DXTextureGutterHelper methods ***/
600     STDMETHOD_(UINT, GetWidth)(THIS) PURE;
601     STDMETHOD_(UINT, GetHeight)(THIS) PURE;
602
603     STDMETHOD(ApplyGuttersFloat)(THIS_ FLOAT *data_in, UINT num_coeffs, UINT width, UINT height) PURE;
604     STDMETHOD(ApplyGuttersTex)(THIS_ LPDIRECT3DTEXTURE9 texture) PURE;
605     STDMETHOD(ApplyGuttersPRT)(THIS_ LPD3DXPRTBUFFER buffer) PURE;
606     STDMETHOD(ResampleTex)(THIS_ LPDIRECT3DTEXTURE9 texture_in, LPD3DXMESH mesh_in,
607         D3DDECLUSAGE usage, UINT usage_index, LPDIRECT3DTEXTURE9 texture_out) PURE;
608     STDMETHOD(GetFaceMap)(THIS_ UINT *face_data) PURE;
609     STDMETHOD(GetBaryMap)(THIS_ D3DXVECTOR2 *bary_data) PURE;
610     STDMETHOD(GetTexelMap)(THIS_ D3DXVECTOR2 *texel_data) PURE;
611     STDMETHOD(GetGutterMap)(THIS_ BYTE *gutter_data) PURE;
612     STDMETHOD(SetFaceMap)(THIS_ UINT *face_data) PURE;
613     STDMETHOD(SetBaryMap)(THIS_ D3DXVECTOR2 *bary_data) PURE;
614     STDMETHOD(SetTexelMap)(THIS_ D3DXVECTOR2 *texel_data) PURE;
615     STDMETHOD(SetGutterMap)(THIS_ BYTE *gutter_data) PURE;
616 };
617 #undef INTERFACE
618
619 #define INTERFACE ID3DXPRTEngine
620 DECLARE_INTERFACE_(ID3DXPRTEngine, IUnknown)
621 {
622     /*** IUnknown methods ***/
623     STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID* object) PURE;
624     STDMETHOD_(ULONG, AddRef)(THIS) PURE;
625     STDMETHOD_(ULONG, Release)(THIS) PURE;
626     /*** ID3DXPRTEngine methods ***/
627     STDMETHOD(SetMeshMaterials)(THIS_ CONST D3DXSHMATERIAL **materials, UINT num_meshes,
628         UINT num_channels, BOOL set_albedo, FLOAT length_scale) PURE;
629     STDMETHOD(SetPerVertexAlbedo)(THIS_ CONST VOID *data_in, UINT num_channels, UINT stride) PURE;
630     STDMETHOD(SetPerTexelAlbedo)(THIS_ LPDIRECT3DTEXTURE9 albedo_texture, UINT num_channels,
631         LPD3DXTEXTUREGUTTERHELPER gh) PURE;
632     STDMETHOD(GetVertexAlbedo)(THIS_ D3DXCOLOR *vert_colors, UINT num_verts) PURE;
633     STDMETHOD(SetPerTexelNormals)(THIS_ LPDIRECT3DTEXTURE9 normal_texture) PURE;
634     STDMETHOD(ExtractPerVertexAlbedo)(THIS_ LPD3DXMESH mesh, D3DDECLUSAGE usage, UINT num_channels) PURE;
635     STDMETHOD(ResampleBuffer)(THIS_ LPD3DXPRTBUFFER buffer_in, LPD3DXPRTBUFFER buffer_out) PURE;
636     STDMETHOD(GetAdaptedMesh)(THIS_ LPDIRECT3DDEVICE9 device, UINT *face_remap,
637         UINT *vert_remap, FLOAT *vert_weights, LPD3DXMESH *mesh) PURE;
638     STDMETHOD_(UINT, GetNumVerts)(THIS) PURE;
639     STDMETHOD_(UINT, GetNumFaces)(THIS) PURE;
640     STDMETHOD(SetMinMaxIntersection)(THIS_ FLOAT min, FLOAT max) PURE;
641     STDMETHOD(RobustMeshRefine)(THIS_ FLOAT min_edge_length, UINT max_subdiv) PURE;
642     STDMETHOD(SetSamplingInfo)(THIS_ UINT num_rays, BOOL use_sphere,
643         BOOL use_cosine, BOOL adaptive, FLOAT adpative_thresh) PURE;
644     STDMETHOD(ComputeDirectLightingSH)(THIS_ UINT sh_order, LPD3DXPRTBUFFER data_out) PURE;
645     STDMETHOD(ComputeDirectLightingSHAdaptive)(THIS_ UINT sh_order, FLOAT adaptive_thresh,
646         FLOAT min_edge_length, UINT max_subdiv, LPD3DXPRTBUFFER data_out) PURE;
647     STDMETHOD(ComputeDirectLightingSHGPU)(THIS_ LPDIRECT3DDEVICE9 device, UINT flags,
648         UINT sh_order, FLOAT zbias, FLOAT zangle_bias, LPD3DXPRTBUFFER data_out) PURE;
649     STDMETHOD(ComputeSS)(THIS_ LPD3DXPRTBUFFER data_in, LPD3DXPRTBUFFER data_out,
650         LPD3DXPRTBUFFER data_total) PURE;
651     STDMETHOD(ComputeSSAdaptive)(THIS_ LPD3DXPRTBUFFER data_in, FLOAT adaptive_thres,
652         FLOAT min_edge_length, UINT max_subdiv, LPD3DXPRTBUFFER data_out, LPD3DXPRTBUFFER data_total) PURE;
653     STDMETHOD(ComputeBounce)(THIS_ LPD3DXPRTBUFFER data_in, LPD3DXPRTBUFFER data_out,
654         LPD3DXPRTBUFFER data_total) PURE;
655     STDMETHOD(ComputeBounceAdaptive)(THIS_ LPD3DXPRTBUFFER data_in, FLOAT adaptive_thres,
656         FLOAT min_edge_length, UINT max_subdiv, LPD3DXPRTBUFFER data_out, LPD3DXPRTBUFFER data_total) PURE;
657     STDMETHOD(ComputeVolumeSamplesDirectSH)(THIS_ UINT sh_order_in, UINT sh_order_out,
658         UINT num_vol_samples, CONST D3DXVECTOR3 *sample_locs, LPD3DXPRTBUFFER data_out) PURE;
659     STDMETHOD(ComputeVolumeSamples)(THIS_ LPD3DXPRTBUFFER surf_data_in, UINT sh_order,
660         UINT num_vol_samples, CONST D3DXVECTOR3 *sample_locs, LPD3DXPRTBUFFER data_out) PURE;
661     STDMETHOD(ComputeSurfSamplesDirectSH)(THIS_ UINT sh_order, UINT num_samples,
662         CONST D3DXVECTOR3 *sample_locs, CONST D3DXVECTOR3 *sample_norms, LPD3DXPRTBUFFER data_out) PURE;
663     STDMETHOD(ComputeSurfSamplesBounce)(THIS_ LPD3DXPRTBUFFER surf_data_in, UINT num_samples,
664         CONST D3DXVECTOR3 *sample_locs, CONST D3DXVECTOR3 *sample_norms, LPD3DXPRTBUFFER data_out,
665         LPD3DXPRTBUFFER data_total) PURE;
666     STDMETHOD(FreeSSData)(THIS) PURE;
667     STDMETHOD(FreeBounceData)(THIS) PURE;
668     STDMETHOD(ComputeLDPRTCoeffs)(THIS_ LPD3DXPRTBUFFER data_in, UINT sh_order, D3DXVECTOR3 *norm_out,
669         LPD3DXPRTBUFFER data_out) PURE;
670     STDMETHOD(ScaleMeshChunk)(THIS_ UINT mesh_chunk, FLOAT scale, LPD3DXPRTBUFFER data_out) PURE;
671     STDMETHOD(MultiplyAlbedo)(THIS_ LPD3DXPRTBUFFER data_out) PURE;
672     STDMETHOD(SetCallback)(THIS_ LPD3DXSHPRTSIMCB cb, FLOAT frequency, LPVOID user_context) PURE;
673     STDMETHOD_(BOOL, ShadowRayIntersects)(THIS_ CONST D3DXVECTOR3 *ray_pos, CONST D3DXVECTOR3 *ray_dir) PURE;
674     STDMETHOD_(BOOL, ClosestRayIntersects)(THIS_ CONST D3DXVECTOR3 *ray_pos, CONST D3DXVECTOR3 *ray_dir,
675         DWORD *face_index, FLOAT *u, FLOAT *v, FLOAT *dist) PURE;
676 };
677 #undef INTERFACE
678
679 #ifdef __cplusplus
680 extern "C" {
681 #endif
682
683 HRESULT WINAPI D3DXCreateMesh(DWORD, DWORD, DWORD, CONST D3DVERTEXELEMENT9 *, LPDIRECT3DDEVICE9, LPD3DXMESH *);
684 HRESULT WINAPI D3DXCreateMeshFVF(DWORD, DWORD, DWORD, DWORD, LPDIRECT3DDEVICE9, LPD3DXMESH *);
685 HRESULT WINAPI D3DXCreateBuffer(DWORD, LPD3DXBUFFER*);
686 HRESULT WINAPI D3DXCreateSPMesh(LPD3DXMESH, CONST DWORD *, CONST D3DXATTRIBUTEWEIGHTS, CONST FLOAT *, LPD3DXSPMESH *);
687 HRESULT WINAPI D3DXCreatePMeshFromStream(IStream *, DWORD, LPDIRECT3DDEVICE9, LPD3DXBUFFER *, LPD3DXBUFFER *, DWORD *, LPD3DXPMESH *);
688 HRESULT WINAPI D3DXCreateSkinInfo(DWORD, CONST D3DVERTEXELEMENT9 *, DWORD, LPD3DXSKININFO *);
689 HRESULT WINAPI D3DXCreateSkinInfoFVF(DWORD, DWORD, DWORD, LPD3DXSKININFO *);
690 HRESULT WINAPI D3DXCreateSkinInfoFromBlendedMesh(LPD3DXBASEMESH, DWORD, CONST D3DXBONECOMBINATION *, LPD3DXSKININFO *);
691 HRESULT WINAPI D3DXCreatePatchMesh(CONST D3DXPATCHINFO *, DWORD, DWORD, DWORD, CONST D3DVERTEXELEMENT9 *, LPDIRECT3DDEVICE9, LPD3DXPATCHMESH *);
692 HRESULT WINAPI D3DXCreatePRTBuffer(UINT, UINT, UINT, LPD3DXPRTBUFFER *);
693 HRESULT WINAPI D3DXCreatePRTBufferTex(UINT, UINT, UINT, UINT, LPD3DXPRTBUFFER *);
694 HRESULT WINAPI D3DXCreatePRTCompBuffer(D3DXSHCOMPRESSQUALITYTYPE, UINT, UINT, LPD3DXSHPRTSIMCB, LPVOID, LPD3DXPRTBUFFER, LPD3DXPRTCOMPBUFFER *);
695 HRESULT WINAPI D3DXCreateTextureGutterHelper(UINT, UINT, LPD3DXMESH, FLOAT, LPD3DXTEXTUREGUTTERHELPER *);
696 HRESULT WINAPI D3DXCreatePRTEngine(LPD3DXMESH, DWORD *, BOOL, LPD3DXMESH, LPD3DXPRTENGINE *);
697 HRESULT WINAPI D3DXLoadMeshFromXA(LPCSTR, DWORD, LPDIRECT3DDEVICE9, LPD3DXBUFFER *, LPD3DXBUFFER *, LPD3DXBUFFER *, DWORD *, LPD3DXMESH *);
698 HRESULT WINAPI D3DXLoadMeshFromXW(LPCWSTR, DWORD, LPDIRECT3DDEVICE9, LPD3DXBUFFER *, LPD3DXBUFFER *, LPD3DXBUFFER *, DWORD *, LPD3DXMESH *);
699 #define D3DXLoadMeshFromX WINELIB_NAME_AW(D3DXLoadMeshFromX)
700 HRESULT WINAPI D3DXLoadMeshFromXInMemory(LPCVOID, DWORD, DWORD, LPDIRECT3DDEVICE9, LPD3DXBUFFER *, LPD3DXBUFFER *, LPD3DXBUFFER *, DWORD *, LPD3DXMESH *);
701 HRESULT WINAPI D3DXLoadMeshFromXResource(HMODULE, LPCSTR, LPCSTR, DWORD, LPDIRECT3DDEVICE9, LPD3DXBUFFER *, LPD3DXBUFFER *, LPD3DXBUFFER *, DWORD *, LPD3DXMESH *);
702 HRESULT WINAPI D3DXLoadMeshFromXof(LPD3DXFILEDATA, DWORD, LPDIRECT3DDEVICE9, LPD3DXBUFFER *, LPD3DXBUFFER *, LPD3DXBUFFER *, DWORD *, LPD3DXMESH *);
703 HRESULT WINAPI D3DXLoadPatchMeshFromXof(LPD3DXFILEDATA, DWORD, LPDIRECT3DDEVICE9, LPD3DXBUFFER *, LPD3DXBUFFER *, LPD3DXBUFFER *, DWORD *, LPD3DXPATCHMESH *);
704 HRESULT WINAPI D3DXLoadSkinMeshFromXof(LPD3DXFILEDATA, DWORD, LPDIRECT3DDEVICE9, LPD3DXBUFFER *, LPD3DXBUFFER *, LPD3DXBUFFER *, DWORD *, LPD3DXSKININFO *, LPD3DXMESH *);
705 HRESULT WINAPI D3DXLoadPRTBufferFromFileA(LPCSTR, LPD3DXPRTBUFFER *);
706 HRESULT WINAPI D3DXLoadPRTBufferFromFileW(LPCWSTR, LPD3DXPRTBUFFER *);
707 #define D3DXLoadPRTBufferFromFile WINELIB_NAME_AW(D3DXLoadPRTBufferFromFile)
708 HRESULT WINAPI D3DXLoadPRTCompBufferFromFileA(LPCSTR, LPD3DXPRTCOMPBUFFER *);
709 HRESULT WINAPI D3DXLoadPRTCompBufferFromFileW(LPCWSTR, LPD3DXPRTCOMPBUFFER *);
710 #define D3DXLoadPRTCompBufferFromFile WINELIB_NAME_AW(D3DXLoadPRTCompBufferFromFile)
711 HRESULT WINAPI D3DXSaveMeshToXA(LPCSTR, LPD3DXMESH, CONST DWORD *, CONST D3DXMATERIAL *, CONST D3DXEFFECTINSTANCE *, DWORD, DWORD);
712 HRESULT WINAPI D3DXSaveMeshToXW(LPCWSTR, LPD3DXMESH, CONST DWORD *, CONST D3DXMATERIAL *, CONST D3DXEFFECTINSTANCE *, DWORD, DWORD);
713 #define D3DXSaveMeshToX WINELIB_NAME_AW(D3DXSaveMeshToX)
714 HRESULT WINAPI D3DXSavePRTBufferToFileA(LPCSTR, LPD3DXPRTBUFFER);
715 HRESULT WINAPI D3DXSavePRTBufferToFileW(LPCWSTR, LPD3DXPRTBUFFER);
716 #define D3DXSavePRTBufferToFile WINELIB_NAME_AW(D3DXSavePRTBufferToFile)
717 HRESULT WINAPI D3DXSavePRTCompBufferToFileA(LPCSTR, LPD3DXPRTCOMPBUFFER);
718 HRESULT WINAPI D3DXSavePRTCompBufferToFileW(LPCWSTR, LPD3DXPRTCOMPBUFFER);
719 #define D3DXSavePRTCompBufferToFile WINELIB_NAME_AW(D3DXSavePRTCompBufferToFile)
720 UINT    WINAPI D3DXGetDeclLength(const D3DVERTEXELEMENT9 *decl);
721 UINT    WINAPI D3DXGetDeclVertexSize(const D3DVERTEXELEMENT9 *decl, DWORD stream_idx);
722 UINT    WINAPI D3DXGetFVFVertexSize(DWORD);
723 BOOL    WINAPI D3DXBoxBoundProbe(CONST D3DXVECTOR3 *, CONST D3DXVECTOR3 *, CONST D3DXVECTOR3 *, CONST D3DXVECTOR3 *);
724 BOOL    WINAPI D3DXSphereBoundProbe(CONST D3DXVECTOR3 *,FLOAT,CONST D3DXVECTOR3 *,CONST D3DXVECTOR3 *);
725 HRESULT WINAPI D3DXCleanMesh(D3DXCLEANTYPE, LPD3DXMESH, CONST DWORD *, LPD3DXMESH *, DWORD *, LPD3DXBUFFER *);
726 HRESULT WINAPI D3DXConcatenateMeshes(LPD3DXMESH *, UINT, DWORD, CONST D3DXMATRIX *, CONST D3DXMATRIX *, CONST D3DVERTEXELEMENT9 *, LPDIRECT3DDEVICE9, LPD3DXMESH *);
727 HRESULT WINAPI D3DXComputeBoundingBox(CONST D3DXVECTOR3 *, DWORD, DWORD, D3DXVECTOR3 *, D3DXVECTOR3 *);
728 HRESULT WINAPI D3DXComputeBoundingSphere(CONST D3DXVECTOR3 *, DWORD, DWORD, D3DXVECTOR3 *, FLOAT *);
729 HRESULT WINAPI D3DXComputeIMTFromPerTexelSignal(LPD3DXMESH, DWORD, FLOAT *, UINT, UINT, UINT, UINT, DWORD, LPD3DXUVATLASCB, LPVOID, LPD3DXBUFFER *);
730 HRESULT WINAPI D3DXComputeIMTFromPerVertexSignal(LPD3DXMESH, CONST FLOAT *, UINT, UINT, DWORD, LPD3DXUVATLASCB, LPVOID, LPD3DXBUFFER *);
731 HRESULT WINAPI D3DXComputeIMTFromSignal(LPD3DXMESH, DWORD, UINT, FLOAT, DWORD, LPD3DXIMTSIGNALCALLBACK, VOID *, LPD3DXUVATLASCB, LPVOID, LPD3DXBUFFER *);
732 HRESULT WINAPI D3DXComputeIMTFromTexture(LPD3DXMESH, LPDIRECT3DTEXTURE9, DWORD, DWORD, LPD3DXUVATLASCB, LPVOID, LPD3DXBUFFER *);
733 HRESULT WINAPI D3DXComputeNormals(LPD3DXBASEMESH, CONST DWORD *);
734 HRESULT WINAPI D3DXComputeTangentFrameEx(LPD3DXMESH, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, CONST DWORD *, FLOAT, FLOAT, FLOAT, LPD3DXMESH *, LPD3DXBUFFER *);
735 HRESULT WINAPI D3DXComputeTangent(LPD3DXMESH, DWORD, DWORD, DWORD, DWORD, CONST DWORD *);
736 HRESULT WINAPI D3DXConvertMeshSubsetToSingleStrip(LPD3DXBASEMESH, DWORD, DWORD, LPDIRECT3DINDEXBUFFER9 *, DWORD *);
737 HRESULT WINAPI D3DXConvertMeshSubsetToStrips(LPD3DXBASEMESH, DWORD, DWORD, LPDIRECT3DINDEXBUFFER9, DWORD *, LPD3DXBUFFER *, DWORD *);
738 HRESULT WINAPI D3DXDeclaratorFromFVF(DWORD, D3DVERTEXELEMENT9[MAX_FVF_DECL_SIZE]);
739 HRESULT WINAPI D3DXFVFFromDeclarator(const D3DVERTEXELEMENT9 *decl, DWORD *fvf);
740 HRESULT WINAPI D3DXGenerateOutputDecl(D3DVERTEXELEMENT9 *, CONST D3DVERTEXELEMENT9 *);
741 HRESULT WINAPI D3DXGeneratePMesh(LPD3DXMESH, CONST DWORD *, CONST D3DXATTRIBUTEWEIGHTS *, CONST FLOAT *, DWORD, DWORD, LPD3DXPMESH *);
742 HRESULT WINAPI D3DXIntersect(LPD3DXBASEMESH, CONST D3DXVECTOR3 *, CONST D3DXVECTOR3 *, BOOL *, DWORD *, FLOAT *, FLOAT *, FLOAT *, LPD3DXBUFFER *, DWORD *);
743 HRESULT WINAPI D3DXIntersectSubset(LPD3DXBASEMESH, DWORD, CONST D3DXVECTOR3 *, CONST D3DXVECTOR3 *, BOOL *, DWORD *, FLOAT *, FLOAT *, FLOAT *, LPD3DXBUFFER *, DWORD *);
744 BOOL    WINAPI D3DXIntersectTri(CONST D3DXVECTOR3 *, CONST D3DXVECTOR3 *, CONST D3DXVECTOR3 *, CONST D3DXVECTOR3 *, CONST D3DXVECTOR3*, FLOAT *, FLOAT *, FLOAT *);
745 HRESULT WINAPI D3DXOptimizeFaces(LPCVOID, UINT, UINT, BOOL, DWORD *);
746 HRESULT WINAPI D3DXOptimizeVertices(LPCVOID, UINT, UINT, BOOL, DWORD *);
747 HRESULT WINAPI D3DXRectPatchSize(CONST FLOAT *, DWORD *, DWORD *);
748 HRESULT WINAPI D3DXSHPRTCompSuperCluster(UINT *, LPD3DXMESH, UINT, UINT, UINT *, UINT *);
749 HRESULT WINAPI D3DXSHPRTCompSplitMeshSC(UINT *, UINT, UINT, UINT *, UINT, LPVOID, BOOL, UINT, LPD3DXBUFFER *, UINT *, BOOL, LPD3DXBUFFER *, LPD3DXBUFFER *, UINT *, UINT *, D3DXSHPRTSPLITMESHCLUSTERDATA *);
750 HRESULT WINAPI D3DXSimplifyMesh(LPD3DXMESH, CONST DWORD *, CONST D3DXATTRIBUTEWEIGHTS, CONST FLOAT *, DWORD, DWORD, LPD3DXMESH *);
751 HRESULT WINAPI D3DXSplitMesh(LPD3DXMESH, CONST DWORD *, CONST DWORD, CONST DWORD, DWORD *, LPD3DXBUFFER *, LPD3DXBUFFER *, LPD3DXBUFFER *, LPD3DXBUFFER *);
752 HRESULT WINAPI D3DXTesselateNPatches(LPD3DXMESH, CONST DWORD *, FLOAT, BOOL, LPD3DXMESH *, LPD3DXBUFFER *);
753 HRESULT WINAPI D3DXTesselateRectPatch(LPDIRECT3DVERTEXBUFFER9, CONST FLOAT *, CONST D3DVERTEXELEMENT9 *, CONST D3DRECTPATCH_INFO *, LPD3DXMESH);
754 HRESULT WINAPI D3DXTesselateTriPatch(LPDIRECT3DVERTEXBUFFER9, CONST FLOAT *, CONST D3DVERTEXELEMENT9 *, CONST D3DTRIPATCH_INFO *, LPD3DXMESH);
755 HRESULT WINAPI D3DXTriPatchSize(CONST FLOAT *, DWORD *, DWORD *);
756 HRESULT WINAPI D3DXUVAtlasCreate(LPD3DXMESH, UINT, FLOAT, UINT, UINT, FLOAT, DWORD, CONST DWORD *, CONST FLOAT *, LPD3DXUVATLASCB, FLOAT, LPVOID, DWORD, LPD3DXMESH *, LPD3DXBUFFER *, LPD3DXBUFFER *, FLOAT *, UINT *);
757 HRESULT WINAPI D3DXUVAtlasPack(ID3DXMesh *, UINT, UINT, FLOAT, DWORD, CONST DWORD *, LPD3DXUVATLASCB, FLOAT, LPVOID, DWORD, LPD3DXBUFFER);
758 HRESULT WINAPI D3DXUVAtlasPartition(LPD3DXMESH, UINT, FLOAT, DWORD, CONST DWORD *, CONST DWORD *, CONST FLOAT *, LPD3DXUVATLASCB, FLOAT, LPVOID, DWORD, LPD3DXMESH *, LPD3DXBUFFER *, LPD3DXBUFFER *, LPD3DXBUFFER *, FLOAT *, UINT *);
759 HRESULT WINAPI D3DXValidMesh(LPD3DXMESH, CONST DWORD *, LPD3DXBUFFER *);
760 HRESULT WINAPI D3DXValidPatchMesh(LPD3DXPATCHMESH, DWORD *, DWORD *, LPD3DXBUFFER *);
761 HRESULT WINAPI D3DXWeldVertices(LPD3DXMESH, DWORD, CONST D3DXWELDEPSILONS *, CONST DWORD *, DWORD *, DWORD *, LPD3DXBUFFER *);
762
763 #ifdef __cplusplus
764 }
765 #endif
766
767 DEFINE_GUID(DXFILEOBJ_XSkinMeshHeader,          0x3cf169ce, 0xff7c, 0x44ab, 0x93, 0xc0, 0xf7, 0x8f, 0x62, 0xd1, 0x72, 0xe2);
768 DEFINE_GUID(DXFILEOBJ_VertexDuplicationIndices, 0xb8d65549, 0xd7c9, 0x4995, 0x89, 0xcf, 0x53, 0xa9, 0xa8, 0xb0, 0x31, 0xe3);
769 DEFINE_GUID(DXFILEOBJ_FaceAdjacency,            0xa64c844a, 0xe282, 0x4756, 0x8b, 0x80, 0x25, 0x0c, 0xde, 0x04, 0x39, 0x8c);
770 DEFINE_GUID(DXFILEOBJ_SkinWeights,              0x6f0d123b, 0xbad2, 0x4167, 0xa0, 0xd0, 0x80, 0x22, 0x4f, 0x25, 0xfa, 0xbb);
771 DEFINE_GUID(DXFILEOBJ_Patch,                    0xa3eb5d44, 0xfc22, 0x429d, 0x9a, 0xfb, 0x32, 0x21, 0xcb, 0x97, 0x19, 0xa6);
772 DEFINE_GUID(DXFILEOBJ_PatchMesh,                0xd02c95cc, 0xedba, 0x4305, 0x9b, 0x5d, 0x18, 0x20, 0xd7, 0x70, 0x4d, 0xbf);
773 DEFINE_GUID(DXFILEOBJ_PatchMesh9,               0xb9ec94e1, 0xb9a6, 0x4251, 0xba, 0x18, 0x94, 0x89, 0x3f, 0x02, 0xc0, 0xea);
774 DEFINE_GUID(DXFILEOBJ_PMInfo,                   0xb6c3e656, 0xec8b, 0x4b92, 0x9b, 0x62, 0x68, 0x16, 0x59, 0x52, 0x29, 0x47);
775 DEFINE_GUID(DXFILEOBJ_PMAttributeRange,         0x917e0427, 0xc61e, 0x4a14, 0x9c, 0x64, 0xaf, 0xe6, 0x5f, 0x9e, 0x98, 0x44);
776 DEFINE_GUID(DXFILEOBJ_PMVSplitRecord,           0x574ccc14, 0xf0b3, 0x4333, 0x82, 0x2d, 0x93, 0xe8, 0xa8, 0xa0, 0x8e, 0x4c);
777 DEFINE_GUID(DXFILEOBJ_FVFData,                  0xb6e70a0e, 0x8ef9, 0x4e83, 0x94, 0xad, 0xec, 0xc8, 0xb0, 0xc0, 0x48, 0x97);
778 DEFINE_GUID(DXFILEOBJ_VertexElement,            0xf752461c, 0x1e23, 0x48f6, 0xb9, 0xf8, 0x83, 0x50, 0x85, 0x0f, 0x33, 0x6f);
779 DEFINE_GUID(DXFILEOBJ_DeclData,                 0xbf22e553, 0x292c, 0x4781, 0x9f, 0xea, 0x62, 0xbd, 0x55, 0x4b, 0xdd, 0x93);
780 DEFINE_GUID(DXFILEOBJ_EffectFloats,             0xf1cfe2b3, 0x0de3, 0x4e28, 0xaf, 0xa1, 0x15, 0x5a, 0x75, 0x0a, 0x28, 0x2d);
781 DEFINE_GUID(DXFILEOBJ_EffectString,             0xd55b097e, 0xbdb6, 0x4c52, 0xb0, 0x3d, 0x60, 0x51, 0xc8, 0x9d, 0x0e, 0x42);
782 DEFINE_GUID(DXFILEOBJ_EffectDWord,              0x622c0ed0, 0x956e, 0x4da9, 0x90, 0x8a, 0x2a, 0xf9, 0x4f, 0x3c, 0xe7, 0x16);
783 DEFINE_GUID(DXFILEOBJ_EffectParamFloats,        0x3014b9a0, 0x62f5, 0x478c, 0x9b, 0x86, 0xe4, 0xac, 0x9f, 0x4e, 0x41, 0x8b);
784 DEFINE_GUID(DXFILEOBJ_EffectParamString,        0x1dbc4c88, 0x94c1, 0x46ee, 0x90, 0x76, 0x2c, 0x28, 0x81, 0x8c, 0x94, 0x81);
785 DEFINE_GUID(DXFILEOBJ_EffectParamDWord,         0xe13963bc, 0xae51, 0x4c5d, 0xb0, 0x0f, 0xcf, 0xa3, 0xa9, 0xd9, 0x7c, 0xe5);
786 DEFINE_GUID(DXFILEOBJ_EffectInstance,           0xe331f7e4, 0x0559, 0x4cc2, 0x8e, 0x99, 0x1c, 0xec, 0x16, 0x57, 0x92, 0x8f);
787 DEFINE_GUID(DXFILEOBJ_AnimTicksPerSecond,       0x9e415a43, 0x7ba6, 0x4a73, 0x87, 0x43, 0xb7, 0x3d, 0x47, 0xe8, 0x84, 0x76);
788 DEFINE_GUID(DXFILEOBJ_CompressedAnimationSet,   0x7f9b00b3, 0xf125, 0x4890, 0x87, 0x6e, 0x1c, 0x42, 0xbf, 0x69, 0x7c, 0x4d);
789
790 #define XSKINEXP_TEMPLATES \
791         "xof 0303txt 0032\
792         template XSkinMeshHeader \
793         { \
794             <3CF169CE-FF7C-44ab-93C0-F78F62D172E2> \
795             WORD nMaxSkinWeightsPerVertex; \
796             WORD nMaxSkinWeightsPerFace; \
797             WORD nBones; \
798         } \
799         template VertexDuplicationIndices \
800         { \
801             <B8D65549-D7C9-4995-89CF-53A9A8B031E3> \
802             DWORD nIndices; \
803             DWORD nOriginalVertices; \
804             array DWORD indices[nIndices]; \
805         } \
806         template FaceAdjacency \
807         { \
808             <A64C844A-E282-4756-8B80-250CDE04398C> \
809             DWORD nIndices; \
810             array DWORD indices[nIndices]; \
811         } \
812         template SkinWeights \
813         { \
814             <6F0D123B-BAD2-4167-A0D0-80224F25FABB> \
815             STRING transformNodeName; \
816             DWORD nWeights; \
817             array DWORD vertexIndices[nWeights]; \
818             array float weights[nWeights]; \
819             Matrix4x4 matrixOffset; \
820         } \
821         template Patch \
822         { \
823             <A3EB5D44-FC22-429D-9AFB-3221CB9719A6> \
824             DWORD nControlIndices; \
825             array DWORD controlIndices[nControlIndices]; \
826         } \
827         template PatchMesh \
828         { \
829             <D02C95CC-EDBA-4305-9B5D-1820D7704BBF> \
830             DWORD nVertices; \
831             array Vector vertices[nVertices]; \
832             DWORD nPatches; \
833             array Patch patches[nPatches]; \
834             [ ... ] \
835         } \
836         template PatchMesh9 \
837         { \
838             <B9EC94E1-B9A6-4251-BA18-94893F02C0EA> \
839             DWORD Type; \
840             DWORD Degree; \
841             DWORD Basis; \
842             DWORD nVertices; \
843             array Vector vertices[nVertices]; \
844             DWORD nPatches; \
845             array Patch patches[nPatches]; \
846             [ ... ] \
847         } template EffectFloats \
848         { \
849             <F1CFE2B3-0DE3-4e28-AFA1-155A750A282D> \
850             DWORD nFloats; \
851             array float Floats[nFloats]; \
852         } \
853         template EffectString \
854         { \
855             <D55B097E-BDB6-4c52-B03D-6051C89D0E42> \
856             STRING Value; \
857         } \
858         template EffectDWord \
859         { \
860             <622C0ED0-956E-4da9-908A-2AF94F3CE716> \
861             DWORD Value; \
862         } template EffectParamFloats \
863         { \
864             <3014B9A0-62F5-478c-9B86-E4AC9F4E418B> \
865             STRING ParamName; \
866             DWORD nFloats; \
867             array float Floats[nFloats]; \
868         } template EffectParamString \
869         { \
870             <1DBC4C88-94C1-46ee-9076-2C28818C9481> \
871             STRING ParamName; \
872             STRING Value; \
873         } \
874         template EffectParamDWord \
875         { \
876             <E13963BC-AE51-4c5d-B00F-CFA3A9D97CE5> \
877             STRING ParamName; \
878             DWORD Value; \
879         } \
880         template EffectInstance \
881         { \
882             <E331F7E4-0559-4cc2-8E99-1CEC1657928F> \
883             STRING EffectFilename; \
884             [ ... ] \
885         } template AnimTicksPerSecond \
886         { \
887             <9E415A43-7BA6-4a73-8743-B73D47E88476> \
888             DWORD AnimTicksPerSecond; \
889         } \
890         template CompressedAnimationSet \
891         { \
892             <7F9B00B3-F125-4890-876E-1C42BF697C4D> \
893             DWORD CompressedBlockSize; \
894             FLOAT TicksPerSec; \
895             DWORD PlaybackType; \
896             DWORD BufferLength; \
897             array DWORD CompressedData[BufferLength]; \
898         } "
899
900 #define XEXTENSIONS_TEMPLATES \
901         "xof 0303txt 0032\
902         template FVFData \
903         { \
904             <B6E70A0E-8EF9-4e83-94AD-ECC8B0C04897> \
905             DWORD dwFVF; \
906             DWORD nDWords; \
907             array DWORD data[nDWords]; \
908         } \
909         template VertexElement \
910         { \
911             <F752461C-1E23-48f6-B9F8-8350850F336F> \
912             DWORD Type; \
913             DWORD Method; \
914             DWORD Usage; \
915             DWORD UsageIndex; \
916         } \
917         template DeclData \
918         { \
919             <BF22E553-292C-4781-9FEA-62BD554BDD93> \
920             DWORD nElements; \
921             array VertexElement Elements[nElements]; \
922             DWORD nDWords; \
923             array DWORD data[nDWords]; \
924         } \
925         template PMAttributeRange \
926         { \
927             <917E0427-C61E-4a14-9C64-AFE65F9E9844> \
928             DWORD iFaceOffset; \
929             DWORD nFacesMin; \
930             DWORD nFacesMax; \
931             DWORD iVertexOffset; \
932             DWORD nVerticesMin; \
933             DWORD nVerticesMax; \
934         } \
935         template PMVSplitRecord \
936         { \
937             <574CCC14-F0B3-4333-822D-93E8A8A08E4C> \
938             DWORD iFaceCLW; \
939             DWORD iVlrOffset; \
940             DWORD iCode; \
941         } \
942         template PMInfo \
943         { \
944             <B6C3E656-EC8B-4b92-9B62-681659522947> \
945             DWORD nAttributes; \
946             array PMAttributeRange attributeRanges[nAttributes]; \
947             DWORD nMaxValence; \
948             DWORD nMinLogicalVertices; \
949             DWORD nMaxLogicalVertices; \
950             DWORD nVSplits; \
951             array PMVSplitRecord splitRecords[nVSplits]; \
952             DWORD nAttributeMispredicts; \
953             array DWORD attributeMispredicts[nAttributeMispredicts]; \
954         } "
955
956 #endif /* __WINE_D3DX9MESH_H */