d3d9/tests: Reenable a VS fog test.
[wine] / include / d3dx9tex.h
1 /*
2  * Copyright (C) 2008 Tony Wasserka
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17  */
18
19 #include <d3dx9.h>
20
21 #ifndef __WINE_D3DX9TEX_H
22 #define __WINE_D3DX9TEX_H
23
24 /**********************************************
25  ***************** Definitions ****************
26  **********************************************/
27 #define D3DX_FILTER_NONE                 0x00000001
28 #define D3DX_FILTER_POINT                0x00000002
29 #define D3DX_FILTER_LINEAR               0x00000003
30 #define D3DX_FILTER_TRIANGLE             0x00000004
31 #define D3DX_FILTER_BOX                  0x00000005
32 #define D3DX_FILTER_MIRROR_U             0x00010000
33 #define D3DX_FILTER_MIRROR_V             0x00020000
34 #define D3DX_FILTER_MIRROR_W             0x00040000
35 #define D3DX_FILTER_MIRROR               0x00070000
36 #define D3DX_FILTER_DITHER               0x00080000
37 #define D3DX_FILTER_DITHER_DIFFUSION     0x00100000
38 #define D3DX_FILTER_SRGB_IN              0x00200000
39 #define D3DX_FILTER_SRGB_OUT             0x00400000
40 #define D3DX_FILTER_SRGB                 0x00600000
41
42 #define D3DX_NORMALMAP_MIRROR_U          0x00010000
43 #define D3DX_NORMALMAP_MIRROR_V          0x00020000
44 #define D3DX_NORMALMAP_MIRROR            0x00030000
45 #define D3DX_NORMALMAP_INVERTSIGN        0x00080000
46 #define D3DX_NORMALMAP_COMPUTE_OCCLUSION 0x00100000
47
48 #define D3DX_CHANNEL_RED                 0x00000001
49 #define D3DX_CHANNEL_BLUE                0x00000002
50 #define D3DX_CHANNEL_GREEN               0x00000004
51 #define D3DX_CHANNEL_ALPHA               0x00000008
52 #define D3DX_CHANNEL_LUMINANCE           0x00000010
53
54 /**********************************************
55  ****************** Typedefs ******************
56  **********************************************/
57 typedef enum _D3DXIMAGE_FILEFORMAT
58 {
59     D3DXIFF_BMP,
60     D3DXIFF_JPG,
61     D3DXIFF_TGA,
62     D3DXIFF_PNG,
63     D3DXIFF_DDS,
64     D3DXIFF_PPM,
65     D3DXIFF_DIB,
66     D3DXIFF_HDR,
67     D3DXIFF_PFM,
68     D3DXIFF_FORCE_DWORD = 0x7fffffff
69 } D3DXIMAGE_FILEFORMAT;
70
71 typedef struct _D3DXIMAGE_INFO
72 {
73     UINT Width;
74     UINT Height;
75     UINT Depth;
76     UINT MipLevels;
77     D3DFORMAT Format;
78     D3DRESOURCETYPE ResourceType;
79     D3DXIMAGE_FILEFORMAT ImageFileFormat;
80 } D3DXIMAGE_INFO;
81
82 /**********************************************
83  ****************** Functions *****************
84  **********************************************/
85 /* Typedefs for callback functions */
86 typedef VOID (WINAPI *LPD3DXFILL2D)(D3DXVECTOR4 *out, CONST D3DXVECTOR2 *texcoord, CONST D3DXVECTOR2 *texelsize, LPVOID data);
87 typedef VOID (WINAPI *LPD3DXFILL3D)(D3DXVECTOR4 *out, CONST D3DXVECTOR3 *texcoord, CONST D3DXVECTOR3 *texelsize, LPVOID data);
88
89 #ifdef __cplusplus
90 extern "C" {
91 #endif
92
93
94 /* Image Information */
95 HRESULT WINAPI D3DXGetImageInfoFromFileA(LPCSTR file, D3DXIMAGE_INFO *info);
96 HRESULT WINAPI D3DXGetImageInfoFromFileW(LPCWSTR file, D3DXIMAGE_INFO *info);
97 #define        D3DXGetImageInfoFromFile WINELIB_NAME_AW(D3DXGetImageInfoFromFile)
98
99 HRESULT WINAPI D3DXGetImageInfoFromResourceA(HMODULE module, LPCSTR resource, D3DXIMAGE_INFO *info);
100 HRESULT WINAPI D3DXGetImageInfoFromResourceW(HMODULE module, LPCWSTR resource, D3DXIMAGE_INFO *info);
101 #define        D3DXGetImageInfoFromResource WINELIB_NAME_AW(D3DXGetImageInfoFromResource)
102
103 HRESULT WINAPI D3DXGetImageInfoFromFileInMemory(LPCVOID data, UINT datasize, D3DXIMAGE_INFO *info);
104
105
106 /* Surface Loading/Saving */
107 HRESULT WINAPI D3DXLoadSurfaceFromFileA(       LPDIRECT3DSURFACE9 destsurface,
108                                                CONST PALETTEENTRY *destpalette,
109                                                CONST RECT *destrect,
110                                                LPCSTR srcfile,
111                                                CONST RECT *srcrect,
112                                                DWORD filter,
113                                                D3DCOLOR colorkey,
114                                                D3DXIMAGE_INFO *srcinfo);
115
116 HRESULT WINAPI D3DXLoadSurfaceFromFileW(       LPDIRECT3DSURFACE9 destsurface,
117                                                CONST PALETTEENTRY *destpalette,
118                                                CONST RECT *destrect,
119                                                LPCWSTR srcfile,
120                                                CONST RECT *srcrect,
121                                                DWORD filter,
122                                                D3DCOLOR colorkey,
123                                                D3DXIMAGE_INFO *srcinfo);
124 #define        D3DXLoadSurfaceFromFile WINELIB_NAME_AW(D3DXLoadSurfaceFromFile)
125
126 HRESULT WINAPI D3DXLoadSurfaceFromResourceA(   LPDIRECT3DSURFACE9 destsurface,
127                                                CONST PALETTEENTRY *destpalette,
128                                                CONST RECT *destrect,
129                                                HMODULE srcmodule,
130                                                LPCSTR resource,
131                                                CONST RECT *srcrect,
132                                                DWORD filter,
133                                                D3DCOLOR colorkey,
134                                                D3DXIMAGE_INFO *srcinfo);
135
136 HRESULT WINAPI D3DXLoadSurfaceFromResourceW(   LPDIRECT3DSURFACE9 destsurface,
137                                                CONST PALETTEENTRY *destpalette,
138                                                CONST RECT *destrect,
139                                                HMODULE srcmodule,
140                                                LPCWSTR resource,
141                                                CONST RECT *srcrect,
142                                                DWORD filter,
143                                                D3DCOLOR colorkey,
144                                                D3DXIMAGE_INFO *srcinfo);
145 #define        D3DXLoadSurfaceFromResource WINELIB_NAME_AW(D3DXLoadSurfaceFromResource)
146
147 HRESULT WINAPI D3DXLoadSurfaceFromFileInMemory(LPDIRECT3DSURFACE9 destsurface,
148                                                CONST PALETTEENTRY *destpalette,
149                                                CONST RECT*destrect,
150                                                LPCVOID srcdata,
151                                                UINT srcdatasize,
152                                                CONST RECT *srcrect,
153                                                DWORD filter,
154                                                D3DCOLOR colorkey,
155                                                D3DXIMAGE_INFO *srcinfo);
156
157 HRESULT WINAPI D3DXLoadSurfaceFromSurface(     LPDIRECT3DSURFACE9 destsurface,
158                                                CONST PALETTEENTRY *destpalette,
159                                                CONST RECT *destrect,
160                                                LPDIRECT3DSURFACE9 srcsurface,
161                                                CONST PALETTEENTRY *srcpalette,
162                                                CONST RECT *srcrect,
163                                                DWORD filter,
164                                                D3DCOLOR colorkey);
165
166 HRESULT WINAPI D3DXLoadSurfaceFromMemory(      LPDIRECT3DSURFACE9 destsurface,
167                                                CONST PALETTEENTRY *destpalette,
168                                                CONST RECT *destrect,
169                                                LPCVOID srcmemory,
170                                                D3DFORMAT srcformat,
171                                                UINT srcpitch,
172                                                CONST PALETTEENTRY *srcpalette,
173                                                CONST RECT *srcrect,
174                                                DWORD filter,
175                                                D3DCOLOR colorkey);
176
177 HRESULT WINAPI D3DXSaveSurfaceToFileA(         LPCSTR destfile,
178                                                D3DXIMAGE_FILEFORMAT destformat,
179                                                LPDIRECT3DSURFACE9 srcsurface,
180                                                CONST PALETTEENTRY *srcpalette,
181                                                CONST RECT *srcrect);
182
183 HRESULT WINAPI D3DXSaveSurfaceToFileW(         LPCWSTR destfile,
184                                                D3DXIMAGE_FILEFORMAT destformat,
185                                                LPDIRECT3DSURFACE9 srcsurface,
186                                                CONST PALETTEENTRY *srcpalette,
187                                                CONST RECT *srcrect);
188 #define        D3DXSaveSurfaceToFile WINELIB_NAME_AW(D3DXSaveSurfaceToFile)
189
190
191 /* Volume Loading/Saving */
192 HRESULT WINAPI D3DXLoadVolumeFromFileA(       LPDIRECT3DVOLUME9 destvolume,
193                                               CONST PALETTEENTRY *destpalette,
194                                               CONST D3DBOX *destbox,
195                                               LPCSTR srcfile,
196                                               CONST D3DBOX *srcbox,
197                                               DWORD filter,
198                                               D3DCOLOR colorkey,
199                                               D3DXIMAGE_INFO *srcinfo);
200
201 HRESULT WINAPI D3DXLoadVolumeFromFileW(       LPDIRECT3DVOLUME9 destVolume,
202                                               CONST PALETTEENTRY *destpalette,
203                                               CONST D3DBOX *destbox,
204                                               LPCWSTR srcfile,
205                                               CONST D3DBOX *srcbox,
206                                               DWORD filter,
207                                               D3DCOLOR colorkey,
208                                               D3DXIMAGE_INFO *srcinfo);
209 #define        D3DXLoadVolumeFromFile WINELIB_NAME_AW(D3DXLoadVolumeFromFile)
210
211 HRESULT WINAPI D3DXLoadVolumeFromResourceA(   LPDIRECT3DVOLUME9 destVolume,
212                                               CONST PALETTEENTRY *destpalette,
213                                               CONST D3DBOX *destbox,
214                                               HMODULE srcmodule,
215                                               LPCSTR resource,
216                                               CONST D3DBOX *srcbox,
217                                               DWORD filter,
218                                               D3DCOLOR colorkey,
219                                               D3DXIMAGE_INFO *srcinfo);
220
221 HRESULT WINAPI D3DXLoadVolumeFromResourceW(   LPDIRECT3DVOLUME9 destVolume,
222                                               CONST PALETTEENTRY *destpalette,
223                                               CONST D3DBOX *destbox,
224                                               HMODULE srcmodule,
225                                               LPCWSTR resource,
226                                               CONST D3DBOX *srcbox,
227                                               DWORD filter,
228                                               D3DCOLOR colorkey,
229                                               D3DXIMAGE_INFO *srcinfo);
230 #define        D3DXLoadVolumeFromResource WINELIB_NAME_AW(D3DXLoadVolumeFromResource)
231
232 HRESULT WINAPI D3DXLoadVolumeFromFileInMemory(LPDIRECT3DVOLUME9 destvolume,
233                                               CONST PALETTEENTRY *destpalette,
234                                               CONST D3DBOX *destbox,
235                                               LPCVOID srcdata,
236                                               UINT srcdatasize,
237                                               CONST D3DBOX *srcbox,
238                                               DWORD filter,
239                                               D3DCOLOR colorkey,
240                                               D3DXIMAGE_INFO *srcinfo);
241
242 HRESULT WINAPI D3DXLoadVolumeFromVolume(      LPDIRECT3DVOLUME9 destvolume,
243                                               CONST PALETTEENTRY *destpalette,
244                                               CONST D3DBOX *destbox,
245                                               LPDIRECT3DVOLUME9 srcvolume,
246                                               CONST PALETTEENTRY *srcpalette,
247                                               CONST D3DBOX *srcbox,
248                                               DWORD filter,
249                                               D3DCOLOR colorkey);
250
251 HRESULT WINAPI D3DXLoadVolumeFromMemory(      LPDIRECT3DVOLUME9 destvolume,
252                                               CONST PALETTEENTRY *destpalette,
253                                               CONST D3DBOX *destbox,
254                                               LPCVOID srcmemory,
255                                               D3DFORMAT srcformat,
256                                               UINT srcrowpitch,
257                                               UINT srcslicepitch,
258                                               CONST PALETTEENTRY *srcpalette,
259                                               CONST D3DBOX *srcbox,
260                                               DWORD filter,
261                                               D3DCOLOR colorkey);
262
263 HRESULT WINAPI D3DXSaveVolumeToFileA(         LPCSTR destfile,
264                                               D3DXIMAGE_FILEFORMAT destformat,
265                                               LPDIRECT3DVOLUME9 srcvolume,
266                                               CONST PALETTEENTRY *srcpalette,
267                                               CONST D3DBOX *srcbox);
268
269 HRESULT WINAPI D3DXSaveVolumeToFileW(         LPCWSTR destfile,
270                                               D3DXIMAGE_FILEFORMAT destformat,
271                                               LPDIRECT3DVOLUME9 srcvolume,
272                                               CONST PALETTEENTRY *srcpalette,
273                                               CONST D3DBOX *srcbox);
274 #define        D3DXSaveVolumeToFile WINELIB_NAME_AW(D3DXSaveVolumeToFile)
275
276
277 /* Texture, cube texture and volume texture creation */
278 HRESULT WINAPI D3DXCheckTextureRequirements(      LPDIRECT3DDEVICE9 device,
279                                                   UINT *width,
280                                                   UINT *height,
281                                                   UINT *miplevels,
282                                                   DWORD usage,
283                                                   D3DFORMAT *format,
284                                                   D3DPOOL pool);
285 HRESULT WINAPI D3DXCheckCubeTextureRequirements(  LPDIRECT3DDEVICE9 device,
286                                                   UINT *size,
287                                                   UINT *miplevels,
288                                                   DWORD usage,
289                                                   D3DFORMAT *format,
290                                                   D3DPOOL pool);
291
292 HRESULT WINAPI D3DXCheckVolumeTextureRequirements(LPDIRECT3DDEVICE9 device,
293                                                   UINT *width,
294                                                   UINT *height,
295                                                   UINT *depth,
296                                                   UINT *miplevels,
297                                                   DWORD usage,
298                                                   D3DFORMAT *format,
299                                                   D3DPOOL pool);
300
301 HRESULT WINAPI D3DXCreateTexture(      LPDIRECT3DDEVICE9 device,
302                                        UINT width,
303                                        UINT height,
304                                        UINT miplevels,
305                                        DWORD usage,
306                                        D3DFORMAT format,
307                                        D3DPOOL pool,
308                                        LPDIRECT3DTEXTURE9 *texture);
309
310 HRESULT WINAPI D3DXCreateCubeTexture(  LPDIRECT3DDEVICE9 device,
311                                        UINT size,
312                                        UINT miplevels,
313                                        DWORD usage,
314                                        D3DFORMAT format,
315                                        D3DPOOL pool,
316                                        LPDIRECT3DCUBETEXTURE9 *cube);
317
318 HRESULT WINAPI D3DXCreateVolumeTexture(LPDIRECT3DDEVICE9 device,
319                                        UINT width,
320                                        UINT height,
321                                        UINT depth,
322                                        UINT miplevels,
323                                        DWORD usage,
324                                        D3DFORMAT format,
325                                        D3DPOOL pool,
326                                        LPDIRECT3DVOLUMETEXTURE9 *volume);
327
328 HRESULT WINAPI D3DXCreateTextureFromFileA(      LPDIRECT3DDEVICE9 device,
329                                                 LPCSTR srcfile,
330                                                 LPDIRECT3DTEXTURE9 *texture);
331
332 HRESULT WINAPI D3DXCreateTextureFromFileW(      LPDIRECT3DDEVICE9 device,
333                                                 LPCWSTR srcfile,
334                                                 LPDIRECT3DTEXTURE9 *texture);
335 #define        D3DXCreateTextureFromFile WINELIB_NAME_AW(D3DXCreateTextureFromFile)
336
337 HRESULT WINAPI D3DXCreateCubeTextureFromFileA(  LPDIRECT3DDEVICE9 device,
338                                                 LPCSTR srcfile,
339                                                 LPDIRECT3DCUBETEXTURE9 *cube);
340
341 HRESULT WINAPI D3DXCreateCubeTextureFromFileW(  LPDIRECT3DDEVICE9 device,
342                                                 LPCWSTR srcfile,
343                                                 LPDIRECT3DCUBETEXTURE9 *cube);
344 #define        D3DXCreateCubeTextureFromFile WINELIB_NAME_AW(D3DXCreateCubeTextureFromFile)
345
346 HRESULT WINAPI D3DXCreateVolumeTextureFromFileA(LPDIRECT3DDEVICE9 device,
347                                                 LPCSTR srcfile,
348                                                 LPDIRECT3DVOLUMETEXTURE9 *volume);
349
350 HRESULT WINAPI D3DXCreateVolumeTextureFromFileW(LPDIRECT3DDEVICE9 device,
351                                                 LPCWSTR srcfile,
352                                                 LPDIRECT3DVOLUMETEXTURE9 *volume);
353 #define        D3DXCreateVolumeTextureFromFile WINELIB_NAME_AW(D3DXCreateVolumeTextureFromFile)
354
355 HRESULT WINAPI D3DXCreateTextureFromResourceA(      LPDIRECT3DDEVICE9 device,
356                                                     HMODULE srcmodule,
357                                                     LPCSTR resource,
358                                                     LPDIRECT3DTEXTURE9 *texture);
359
360 HRESULT WINAPI D3DXCreateTextureFromResourceW(      LPDIRECT3DDEVICE9 device,
361                                                     HMODULE srcmodule,
362                                                     LPCWSTR resource,
363                                                     LPDIRECT3DTEXTURE9 *texture);
364 #define        D3DXCreateTextureFromResource WINELIB_NAME_AW(D3DXCreateTextureFromResource)
365
366 HRESULT WINAPI D3DXCreateCubeTextureFromResourceA(  LPDIRECT3DDEVICE9 device,
367                                                     HMODULE srcmodule,
368                                                     LPCSTR resource,
369                                                     LPDIRECT3DCUBETEXTURE9 *cube);
370 HRESULT WINAPI D3DXCreateCubeTextureFromResourceW(  LPDIRECT3DDEVICE9 device,
371                                                     HMODULE srcmodule,
372                                                     LPCWSTR resource,
373                                                     LPDIRECT3DCUBETEXTURE9 *cube);
374 #define        D3DXCreateCubeTextureFromResource WINELIB_NAME_AW(D3DXCreateCubeTextureFromResource)
375
376 HRESULT WINAPI D3DXCreateVolumeTextureFromResourceA(LPDIRECT3DDEVICE9 device,
377                                                     HMODULE srcmodule,
378                                                     LPCSTR resource,
379                                                     LPDIRECT3DVOLUMETEXTURE9 *volume);
380 HRESULT WINAPI D3DXCreateVolumeTextureFromResourceW(LPDIRECT3DDEVICE9 device,
381                                                     HMODULE srcmodule,
382                                                     LPCWSTR resource,
383                                                     LPDIRECT3DVOLUMETEXTURE9 *volume);
384 #define        D3DXCreateVolumeTextureFromResource WINELIB_NAME_AW(D3DXCreateVolumeTextureFromResource)
385
386 HRESULT WINAPI D3DXCreateTextureFromFileExA(      LPDIRECT3DDEVICE9 device,
387                                                   LPCSTR srcfile,
388                                                   UINT width,
389                                                   UINT height,
390                                                   UINT miplevels,
391                                                   DWORD usage,
392                                                   D3DFORMAT format,
393                                                   D3DPOOL pool,
394                                                   DWORD filter,
395                                                   DWORD mipfilter,
396                                                   D3DCOLOR colorkey,
397                                                   D3DXIMAGE_INFO *srcinfo,
398                                                   PALETTEENTRY *palette,
399                                                   LPDIRECT3DTEXTURE9 *texture);
400
401 HRESULT WINAPI D3DXCreateTextureFromFileExW(      LPDIRECT3DDEVICE9 device,
402                                                   LPCWSTR srcfile,
403                                                   UINT width,
404                                                   UINT height,
405                                                   UINT miplevels,
406                                                   DWORD usage,
407                                                   D3DFORMAT format,
408                                                   D3DPOOL pool,
409                                                   DWORD filter,
410                                                   DWORD mipfilter,
411                                                   D3DCOLOR colorkey,
412                                                   D3DXIMAGE_INFO *srcinfo,
413                                                   PALETTEENTRY *palette,
414                                                   LPDIRECT3DTEXTURE9 *texture);
415 #define        D3DXCreateTextureFromFileEx WINELIB_NAME_AW(D3DXCreateTextureFromFileEx)
416
417 HRESULT WINAPI D3DXCreateCubeTextureFromFileExA(  LPDIRECT3DDEVICE9 device,
418                                                   LPCSTR srcfile,
419                                                   UINT size,
420                                                   UINT miplevels,
421                                                   DWORD usage,
422                                                   D3DFORMAT format,
423                                                   D3DPOOL pool,
424                                                   DWORD filter,
425                                                   DWORD mipfilter,
426                                                   D3DCOLOR colorkey,
427                                                   D3DXIMAGE_INFO *srcinfo,
428                                                   PALETTEENTRY *palette,
429                                                   LPDIRECT3DCUBETEXTURE9 *cube);
430
431 HRESULT WINAPI D3DXCreateCubeTextureFromFileExW(  LPDIRECT3DDEVICE9 device,
432                                                   LPCWSTR srcfile,
433                                                   UINT size,
434                                                   UINT miplevels,
435                                                   DWORD usage,
436                                                   D3DFORMAT format,
437                                                   D3DPOOL pool,
438                                                   DWORD filter,
439                                                   DWORD mipfilter,
440                                                   D3DCOLOR colorkey,
441                                                   D3DXIMAGE_INFO *srcinfo,
442                                                   PALETTEENTRY *palette,
443                                                   LPDIRECT3DCUBETEXTURE9 *cube);
444 #define        D3DXCreateCubeTextureFromFileEx WINELIB_NAME_AW(D3DXCreateCubeTextureFromFileEx)
445
446 HRESULT WINAPI D3DXCreateVolumeTextureFromFileExA(LPDIRECT3DDEVICE9 device,
447                                                   LPCSTR srcfile,
448                                                   UINT width,
449                                                   UINT height,
450                                                   UINT depth,
451                                                   UINT miplevels,
452                                                   DWORD usage,
453                                                   D3DFORMAT format,
454                                                   D3DPOOL pool,
455                                                   DWORD filter,
456                                                   DWORD mipfilter,
457                                                   D3DCOLOR colorkey,
458                                                   D3DXIMAGE_INFO *srcinfo,
459                                                   PALETTEENTRY *palette,
460                                                   LPDIRECT3DVOLUMETEXTURE9 *volume);
461
462 HRESULT WINAPI D3DXCreateVolumeTextureFromFileExW(LPDIRECT3DDEVICE9 device,
463                                                   LPCWSTR srcfile,
464                                                   UINT width,
465                                                   UINT height,
466                                                   UINT depth,
467                                                   UINT miplevels,
468                                                   DWORD usage,
469                                                   D3DFORMAT format,
470                                                   D3DPOOL pool,
471                                                   DWORD filter,
472                                                   DWORD mipfilter,
473                                                   D3DCOLOR colorkey,
474                                                   D3DXIMAGE_INFO *srcinfo,
475                                                   PALETTEENTRY *palette,
476                                                   LPDIRECT3DVOLUMETEXTURE9 *volume);
477 #define        D3DXCreateVolumeTextureFromFileEx WINELIB_NAME_AW(D3DXCreateVolumeTextureFromFileEx)
478
479 HRESULT WINAPI D3DXCreateTextureFromResourceExA(      LPDIRECT3DDEVICE9 device,
480                                                       HMODULE srcmodule,
481                                                       LPCSTR resource,
482                                                       UINT width,
483                                                       UINT height,
484                                                       UINT miplevels,
485                                                       DWORD usage,
486                                                       D3DFORMAT format,
487                                                       D3DPOOL pool,
488                                                       DWORD filter,
489                                                       DWORD mipfilter,
490                                                       D3DCOLOR colorkey,
491                                                       D3DXIMAGE_INFO *srcinfo,
492                                                       PALETTEENTRY *palette,
493                                                       LPDIRECT3DTEXTURE9 *texture);
494
495 HRESULT WINAPI D3DXCreateTextureFromResourceExW(      LPDIRECT3DDEVICE9 device,
496                                                       HMODULE srcmodule,
497                                                       LPCWSTR resource,
498                                                       UINT width,
499                                                       UINT height,
500                                                       UINT miplevels,
501                                                       DWORD usage,
502                                                       D3DFORMAT format,
503                                                       D3DPOOL pool,
504                                                       DWORD filter,
505                                                       DWORD mipfilter,
506                                                       D3DCOLOR colorkey,
507                                                       D3DXIMAGE_INFO *srcinfo,
508                                                       PALETTEENTRY *palette,
509                                                       LPDIRECT3DTEXTURE9 *texture);
510 #define        D3DXCreateTextureFromResourceEx WINELIB_NAME_AW(D3DXCreateTextureFromResourceEx)
511
512 HRESULT WINAPI D3DXCreateCubeTextureFromResourceExA(  LPDIRECT3DDEVICE9 device,
513                                                       HMODULE srcmodule,
514                                                       LPCSTR resource,
515                                                       UINT size,
516                                                       UINT miplevels,
517                                                       DWORD usage,
518                                                       D3DFORMAT format,
519                                                       D3DPOOL pool,
520                                                       DWORD filter,
521                                                       DWORD mipfilter,
522                                                       D3DCOLOR colorkey,
523                                                       D3DXIMAGE_INFO *srcinfo,
524                                                       PALETTEENTRY *palette,
525                                                       LPDIRECT3DCUBETEXTURE9 *cube);
526
527 HRESULT WINAPI D3DXCreateCubeTextureFromResourceExW(  LPDIRECT3DDEVICE9 device,
528                                                       HMODULE srcmodule,
529                                                       LPCWSTR resource,
530                                                       UINT size,
531                                                       UINT miplevels,
532                                                       DWORD usage,
533                                                       D3DFORMAT format,
534                                                       D3DPOOL pool,
535                                                       DWORD filter,
536                                                       DWORD mipfilter,
537                                                       D3DCOLOR colorkey,
538                                                       D3DXIMAGE_INFO *srcinfo,
539                                                       PALETTEENTRY *palette,
540                                                       LPDIRECT3DCUBETEXTURE9 *cube);
541 #define        D3DXCreateCubeTextureFromResourceEx WINELIB_NAME_AW(D3DXCreateCubeTextureFromResourceEx)
542
543 HRESULT WINAPI D3DXCreateVolumeTextureFromResourceExA(LPDIRECT3DDEVICE9 device,
544                                                       HMODULE srcmodule,
545                                                       LPCSTR resource,
546                                                       UINT width,
547                                                       UINT height,
548                                                       UINT depth,
549                                                       UINT miplevels,
550                                                       DWORD usage,
551                                                       D3DFORMAT format,
552                                                       D3DPOOL pool,
553                                                       DWORD filter,
554                                                       DWORD mipfilter,
555                                                       D3DCOLOR colorkey,
556                                                       D3DXIMAGE_INFO *srcinfo,
557                                                       PALETTEENTRY *palette,
558                                                       LPDIRECT3DVOLUMETEXTURE9 *volume);
559
560 HRESULT WINAPI D3DXCreateVolumeTextureFromResourceExW(LPDIRECT3DDEVICE9 device,
561                                                       HMODULE srcmodule,
562                                                       LPCWSTR resource,
563                                                       UINT width,
564                                                       UINT height,
565                                                       UINT depth,
566                                                       UINT miplevels,
567                                                       DWORD usage,
568                                                       D3DFORMAT format,
569                                                       D3DPOOL pool,
570                                                       DWORD filter,
571                                                       DWORD mipfilter,
572                                                       D3DCOLOR colorkey,
573                                                       D3DXIMAGE_INFO *srcinfo,
574                                                       PALETTEENTRY *palette,
575                                                       LPDIRECT3DVOLUMETEXTURE9 *volume);
576 #define        D3DXCreateVolumeTextureFromResourceEx WINELIB_NAME_AW(D3DXCreateVolumeTextureFromResourceEx)
577
578 HRESULT WINAPI D3DXCreateTextureFromFileInMemory(      LPDIRECT3DDEVICE9 device,
579                                                        LPCVOID srcdata,
580                                                        UINT srcdatasize,
581                                                        LPDIRECT3DTEXTURE9* texture);
582
583 HRESULT WINAPI D3DXCreateCubeTextureFromFileInMemory(  LPDIRECT3DDEVICE9 device,
584                                                        LPCVOID srcdata,
585                                                        UINT srcdatasize,
586                                                        LPDIRECT3DCUBETEXTURE9* cube);
587
588 HRESULT WINAPI D3DXCreateVolumeTextureFromFileInMemory(LPDIRECT3DDEVICE9 device,
589                                                        LPCVOID srcdata,
590                                                        UINT srcdatasize,
591                                                        LPDIRECT3DVOLUMETEXTURE9 *volume);
592
593 HRESULT WINAPI D3DXCreateTextureFromFileInMemoryEx(      LPDIRECT3DDEVICE9 device,
594                                                          LPCVOID srcdata,
595                                                          UINT srcdatasize,
596                                                          UINT width,
597                                                          UINT height,
598                                                          UINT miplevels,
599                                                          DWORD usage,
600                                                          D3DFORMAT format,
601                                                          D3DPOOL pool,
602                                                          DWORD filter,
603                                                          DWORD mipfilter,
604                                                          D3DCOLOR colorkey,
605                                                          D3DXIMAGE_INFO *srcinfo,
606                                                          PALETTEENTRY *palette,
607                                                          LPDIRECT3DTEXTURE9 *texture);
608
609 HRESULT WINAPI D3DXCreateCubeTextureFromFileInMemoryEx(  LPDIRECT3DDEVICE9 device,
610                                                          LPCVOID srcdata,
611                                                          UINT srcdatasize,
612                                                          UINT size,
613                                                          UINT miplevels,
614                                                          DWORD usage,
615                                                          D3DFORMAT format,
616                                                          D3DPOOL pool,
617                                                          DWORD filter,
618                                                          DWORD mipfilter,
619                                                          D3DCOLOR colorkey,
620                                                          D3DXIMAGE_INFO *srcinfo,
621                                                          PALETTEENTRY *palette,
622                                                          LPDIRECT3DCUBETEXTURE9 *cube);
623
624 HRESULT WINAPI D3DXCreateVolumeTextureFromFileInMemoryEx(LPDIRECT3DDEVICE9 device,
625                                                          LPCVOID srcdata,
626                                                          UINT srcdatasize,
627                                                          UINT width,
628                                                          UINT height,
629                                                          UINT depth,
630                                                          UINT miplevels,
631                                                          DWORD usage,
632                                                          D3DFORMAT format,
633                                                          D3DPOOL pool,
634                                                          DWORD filter,
635                                                          DWORD mipfilter,
636                                                          D3DCOLOR colorkey,
637                                                          D3DXIMAGE_INFO *srcinfo,
638                                                          PALETTEENTRY *palette,
639                                                          LPDIRECT3DVOLUMETEXTURE9 *volume);
640
641 HRESULT WINAPI D3DXSaveTextureToFileA(LPCSTR destfile,
642                                       D3DXIMAGE_FILEFORMAT destformat,
643                                       LPDIRECT3DBASETEXTURE9 srctexture,
644                                       CONST PALETTEENTRY *srcpalette);
645 HRESULT WINAPI D3DXSaveTextureToFileW(LPCWSTR destfile,
646                                       D3DXIMAGE_FILEFORMAT destformat,
647                                       LPDIRECT3DBASETEXTURE9 srctexture,
648                                       CONST PALETTEENTRY *srcpalette);
649 #define        D3DXSaveTextureToFile WINELIB_NAME_AW(D3DXSaveTextureToFile)
650
651
652 /* Other functions */
653 HRESULT WINAPI D3DXFilterTexture(      LPDIRECT3DBASETEXTURE9 texture,
654                                        CONST PALETTEENTRY *palette,
655                                        UINT srclevel,
656                                        DWORD filter);
657 #define D3DXFilterCubeTexture D3DXFilterTexture
658 #define D3DXFilterVolumeTexture D3DXFilterTexture
659
660 HRESULT WINAPI D3DXFillTexture(        LPDIRECT3DTEXTURE9 texture,
661                                        LPD3DXFILL2D function,
662                                        LPVOID data);
663
664 HRESULT WINAPI D3DXFillCubeTexture(    LPDIRECT3DCUBETEXTURE9 cube,
665                                        LPD3DXFILL3D function,
666                                        LPVOID data);
667
668 HRESULT WINAPI D3DXFillVolumeTexture(  LPDIRECT3DVOLUMETEXTURE9 volume,
669                                        LPD3DXFILL3D function,
670                                        LPVOID data);
671
672 HRESULT WINAPI D3DXFillTextureTX(      LPDIRECT3DTEXTURE9 texture,
673                                        CONST DWORD *function,
674                                        CONST D3DXVECTOR4 *constants,
675                                        UINT numconstants);
676
677 HRESULT WINAPI D3DXFillCubeTextureTX(  LPDIRECT3DCUBETEXTURE9 cube,
678                                        CONST DWORD *function,
679                                        CONST D3DXVECTOR4 *constants,
680                                        UINT numconstants);
681
682 HRESULT WINAPI D3DXFillVolumeTextureTX(LPDIRECT3DVOLUMETEXTURE9 volume,
683                                        CONST DWORD *function,
684                                        CONST D3DXVECTOR4 *constants,
685                                        UINT numconstants);
686
687 HRESULT WINAPI D3DXComputeNormalMap(   LPDIRECT3DTEXTURE9 texture,
688                                        LPDIRECT3DTEXTURE9 srctexture,
689                                        CONST PALETTEENTRY *srcpalette,
690                                        DWORD flags,
691                                        DWORD channel,
692                                        FLOAT amplitude);
693
694
695 #ifdef __cplusplus
696 }
697 #endif
698
699 #endif /* __WINE_D3DX9TEX_H */