include: Fix REFPROPVARIANT definition.
[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_FORCE_DWORD = 0x7fffffff
67 } D3DXIMAGE_FILEFORMAT;
68
69 typedef struct _D3DXIMAGE_INFO
70 {
71     UINT Width;
72     UINT Height;
73     UINT Depth;
74     UINT MipLevels;
75     D3DFORMAT Format;
76     D3DRESOURCETYPE ResourceType;
77     D3DXIMAGE_FILEFORMAT ImageFileFormat;
78 } D3DXIMAGE_INFO;
79
80 /**********************************************
81  ****************** Functions *****************
82  **********************************************/
83 /* Typedefs for callback functions */
84 typedef VOID (WINAPI *LPD3DXFILL2D)(D3DXVECTOR4 *out, CONST D3DXVECTOR2 *texcoord, CONST D3DXVECTOR2 *texelsize, LPVOID data);
85 typedef VOID (WINAPI *LPD3DXFILL3D)(D3DXVECTOR4 *out, CONST D3DXVECTOR3 *texcoord, CONST D3DXVECTOR3 *texelsize, LPVOID data);
86
87 #ifdef __cplusplus
88 extern "C" {
89 #endif
90
91
92 /* Image Information */
93 HRESULT WINAPI D3DXGetImageInfoFromFileA(LPCSTR file, D3DXIMAGE_INFO *info);
94 HRESULT WINAPI D3DXGetImageInfoFromFileW(LPCWSTR file, D3DXIMAGE_INFO *info);
95 #define        D3DXGetImageInfoFromFile WINELIB_NAME_AW(D3DXGetImageInfoFromFile)
96
97 HRESULT WINAPI D3DXGetImageInfoFromResourceA(HMODULE module, LPCSTR resource, D3DXIMAGE_INFO *info);
98 HRESULT WINAPI D3DXGetImageInfoFromResourceW(HMODULE module, LPCWSTR resource, D3DXIMAGE_INFO *info);
99 #define        D3DXGetImageInfoFromResource WINELIB_NAME_AW(D3DXGetImageInfoFromResource)
100
101 HRESULT WINAPI D3DXGetImageInfoFromFileInMemory(LPCVOID data, UINT datasize, D3DXIMAGE_INFO *info);
102
103
104 /* Surface Loading/Saving */
105 HRESULT WINAPI D3DXLoadSurfaceFromFileA(       LPDIRECT3DSURFACE9 destsurface,
106                                                CONST PALETTEENTRY *destpalette,
107                                                CONST RECT *destrect,
108                                                LPCSTR srcfile,
109                                                CONST RECT *srcrect,
110                                                DWORD filter,
111                                                D3DCOLOR colorkey,
112                                                D3DXIMAGE_INFO *srcinfo);
113
114 HRESULT WINAPI D3DXLoadSurfaceFromFileW(       LPDIRECT3DSURFACE9 destsurface,
115                                                CONST PALETTEENTRY *destpalette,
116                                                CONST RECT *destrect,
117                                                LPCWSTR srcfile,
118                                                CONST RECT *srcrect,
119                                                DWORD filter,
120                                                D3DCOLOR colorkey,
121                                                D3DXIMAGE_INFO *srcinfo);
122 #define        D3DXLoadSurfaceFromFile WINELIB_NAME_AW(D3DXLoadSurfaceFromFile)
123
124 HRESULT WINAPI D3DXLoadSurfaceFromResourceA(   LPDIRECT3DSURFACE9 destsurface,
125                                                CONST PALETTEENTRY *destpalette,
126                                                CONST RECT *destrect,
127                                                HMODULE srcmodule,
128                                                LPCSTR resource,
129                                                CONST RECT *srcrect,
130                                                DWORD filter,
131                                                D3DCOLOR colorkey,
132                                                D3DXIMAGE_INFO *srcinfo);
133
134 HRESULT WINAPI D3DXLoadSurfaceFromResourceW(   LPDIRECT3DSURFACE9 destsurface,
135                                                CONST PALETTEENTRY *destpalette,
136                                                CONST RECT *destrect,
137                                                HMODULE srcmodule,
138                                                LPCWSTR resource,
139                                                CONST RECT *srcrect,
140                                                DWORD filter,
141                                                D3DCOLOR colorkey,
142                                                D3DXIMAGE_INFO *srcinfo);
143 #define        D3DXLoadSurfaceFromResource WINELIB_NAME_AW(D3DXLoadSurfaceFromResource)
144
145 HRESULT WINAPI D3DXLoadSurfaceFromFileInMemory(LPDIRECT3DSURFACE9 destsurface,
146                                                CONST PALETTEENTRY *destpalette,
147                                                CONST RECT*destrect,
148                                                LPCVOID srcdata,
149                                                UINT srcdatasize,
150                                                CONST RECT *srcrect,
151                                                DWORD filter,
152                                                D3DCOLOR colorkey,
153                                                D3DXIMAGE_INFO *srcinfo);
154
155 HRESULT WINAPI D3DXLoadSurfaceFromSurface(     LPDIRECT3DSURFACE9 destsurface,
156                                                CONST PALETTEENTRY *destpalette,
157                                                CONST RECT *destrect,
158                                                LPDIRECT3DSURFACE9 srcsurface,
159                                                CONST PALETTEENTRY *srcpalette,
160                                                CONST RECT *srcrect,
161                                                DWORD filter,
162                                                D3DCOLOR colorkey);
163
164 HRESULT WINAPI D3DXLoadSurfaceFromMemory(      LPDIRECT3DSURFACE9 destsurface,
165                                                CONST PALETTEENTRY *destpalette,
166                                                CONST RECT *destrect,
167                                                LPCVOID srcmemory,
168                                                D3DFORMAT srcformat,
169                                                UINT srcpitch,
170                                                CONST PALETTEENTRY *srcpalette,
171                                                CONST RECT *srcrect,
172                                                DWORD filter,
173                                                D3DCOLOR colorkey);
174
175 HRESULT WINAPI D3DXSaveSurfaceToFileA(         LPCSTR destfile,
176                                                D3DXIMAGE_FILEFORMAT destformat,
177                                                LPDIRECT3DSURFACE9 srcsurface,
178                                                CONST PALETTEENTRY *srcpalette,
179                                                CONST RECT *srcrect);
180
181 HRESULT WINAPI D3DXSaveSurfaceToFileW(         LPCWSTR destfile,
182                                                D3DXIMAGE_FILEFORMAT destformat,
183                                                LPDIRECT3DSURFACE9 srcsurface,
184                                                CONST PALETTEENTRY *srcpalette,
185                                                CONST RECT *srcrect);
186 #define        D3DXSaveSurfaceToFile WINELIB_NAME_AW(D3DXSaveSurfaceToFile)
187
188
189 /* Volume Loading/Saving */
190 HRESULT WINAPI D3DXLoadVolumeFromFileA(       LPDIRECT3DVOLUME9 destvolume,
191                                               CONST PALETTEENTRY *destpalette,
192                                               CONST D3DBOX *destbox,
193                                               LPCSTR srcfile,
194                                               CONST D3DBOX *srcbox,
195                                               DWORD filter,
196                                               D3DCOLOR colorkey,
197                                               D3DXIMAGE_INFO *srcinfo);
198
199 HRESULT WINAPI D3DXLoadVolumeFromFileW(       LPDIRECT3DVOLUME9 destVolume,
200                                               CONST PALETTEENTRY *destpalette,
201                                               CONST D3DBOX *destbox,
202                                               LPCWSTR srcfile,
203                                               CONST D3DBOX *srcbox,
204                                               DWORD filter,
205                                               D3DCOLOR colorkey,
206                                               D3DXIMAGE_INFO *srcinfo);
207 #define        D3DXLoadVolumeFromFile WINELIB_NAME_AW(D3DXLoadVolumeFromFile)
208
209 HRESULT WINAPI D3DXLoadVolumeFromResourceA(   LPDIRECT3DVOLUME9 destVolume,
210                                               CONST PALETTEENTRY *destpalette,
211                                               CONST D3DBOX *destbox,
212                                               HMODULE srcmodule,
213                                               LPCSTR resource,
214                                               CONST D3DBOX *srcbox,
215                                               DWORD filter,
216                                               D3DCOLOR colorkey,
217                                               D3DXIMAGE_INFO *srcinfo);
218
219 HRESULT WINAPI D3DXLoadVolumeFromResourceW(   LPDIRECT3DVOLUME9 destVolume,
220                                               CONST PALETTEENTRY *destpalette,
221                                               CONST D3DBOX *destbox,
222                                               HMODULE srcmodule,
223                                               LPCWSTR resource,
224                                               CONST D3DBOX *srcbox,
225                                               DWORD filter,
226                                               D3DCOLOR colorkey,
227                                               D3DXIMAGE_INFO *srcinfo);
228 #define        D3DXLoadVolumeFromResource WINELIB_NAME_AW(D3DXLoadVolumeFromResource)
229
230 HRESULT WINAPI D3DXLoadVolumeFromFileInMemory(LPDIRECT3DVOLUME9 destvolume,
231                                               CONST PALETTEENTRY *destpalette,
232                                               CONST D3DBOX *destbox,
233                                               LPCVOID srcdata,
234                                               UINT srcdatasize,
235                                               CONST D3DBOX *srcbox,
236                                               DWORD filter,
237                                               D3DCOLOR colorkey,
238                                               D3DXIMAGE_INFO *srcinfo);
239
240 HRESULT WINAPI D3DXLoadVolumeFromVolume(      LPDIRECT3DVOLUME9 destvolume,
241                                               CONST PALETTEENTRY *destpalette,
242                                               CONST D3DBOX *destbox,
243                                               LPDIRECT3DVOLUME9 srcvolume,
244                                               CONST PALETTEENTRY *srcpalette,
245                                               CONST D3DBOX *srcbox,
246                                               DWORD filter,
247                                               D3DCOLOR colorkey);
248
249 HRESULT WINAPI D3DXLoadVolumeFromMemory(      LPDIRECT3DVOLUME9 destvolume,
250                                               CONST PALETTEENTRY *destpalette,
251                                               CONST D3DBOX *destbox,
252                                               LPCVOID srcmemory,
253                                               D3DFORMAT srcformat,
254                                               UINT srcrowpitch,
255                                               UINT srcslicepitch,
256                                               CONST PALETTEENTRY *srcpalette,
257                                               CONST D3DBOX *srcbox,
258                                               DWORD filter,
259                                               D3DCOLOR colorkey);
260
261 HRESULT WINAPI D3DXSaveVolumeToFileA(         LPCSTR destfile,
262                                               D3DXIMAGE_FILEFORMAT destformat,
263                                               LPDIRECT3DVOLUME9 srcvolume,
264                                               CONST PALETTEENTRY *srcpalette,
265                                               CONST D3DBOX *srcbox);
266
267 HRESULT WINAPI D3DXSaveVolumeToFileW(         LPCWSTR destfile,
268                                               D3DXIMAGE_FILEFORMAT destformat,
269                                               LPDIRECT3DVOLUME9 srcvolume,
270                                               CONST PALETTEENTRY *srcpalette,
271                                               CONST D3DBOX *srcbox);
272 #define        D3DXSaveVolumeToFile WINELIB_NAME_AW(D3DXSaveVolumeToFile)
273
274
275 /* Texture, cube texture and volume texture creation */
276 HRESULT WINAPI D3DXCheckTextureRequirements(      LPDIRECT3DDEVICE9 device,
277                                                   UINT *width,
278                                                   UINT *height,
279                                                   UINT *miplevels,
280                                                   DWORD usage,
281                                                   D3DFORMAT *format,
282                                                   D3DPOOL pool);
283 HRESULT WINAPI D3DXCheckCubeTextureRequirements(  LPDIRECT3DDEVICE9 device,
284                                                   UINT *size,
285                                                   UINT *miplevels,
286                                                   DWORD usage,
287                                                   D3DFORMAT *format,
288                                                   D3DPOOL pool);
289
290 HRESULT WINAPI D3DXCheckVolumeTextureRequirements(LPDIRECT3DDEVICE9 device,
291                                                   UINT *width,
292                                                   UINT *height,
293                                                   UINT *depth,
294                                                   UINT *miplevels,
295                                                   DWORD usage,
296                                                   D3DFORMAT *format,
297                                                   D3DPOOL pool);
298
299 HRESULT WINAPI D3DXCreateTexture(      LPDIRECT3DDEVICE9 device,
300                                        UINT width,
301                                        UINT height,
302                                        UINT miplevels,
303                                        DWORD usage,
304                                        D3DFORMAT format,
305                                        D3DPOOL pool,
306                                        LPDIRECT3DTEXTURE9 *texture);
307
308 HRESULT WINAPI D3DXCreateCubeTexture(  LPDIRECT3DDEVICE9 device,
309                                        UINT size,
310                                        UINT miplevels,
311                                        DWORD usage,
312                                        D3DFORMAT format,
313                                        D3DPOOL pool,
314                                        LPDIRECT3DCUBETEXTURE9 *cube);
315
316 HRESULT WINAPI D3DXCreateVolumeTexture(LPDIRECT3DDEVICE9 device,
317                                        UINT width,
318                                        UINT height,
319                                        UINT depth,
320                                        UINT miplevels,
321                                        DWORD usage,
322                                        D3DFORMAT format,
323                                        D3DPOOL pool,
324                                        LPDIRECT3DVOLUMETEXTURE9 *volume);
325
326 HRESULT WINAPI D3DXCreateTextureFromFileA(      LPDIRECT3DDEVICE9 device,
327                                                 LPCSTR srcfile,
328                                                 LPDIRECT3DTEXTURE9 *texture);
329
330 HRESULT WINAPI D3DXCreateTextureFromFileW(      LPDIRECT3DDEVICE9 device,
331                                                 LPCWSTR srcfile,
332                                                 LPDIRECT3DTEXTURE9 *texture);
333 #define        D3DXCreateTextureFromFile WINELIB_NAME_AW(D3DXCreateTextureFromFile)
334
335 HRESULT WINAPI D3DXCreateCubeTextureFromFileA(  LPDIRECT3DDEVICE9 device,
336                                                 LPCSTR srcfile,
337                                                 LPDIRECT3DCUBETEXTURE9 *cube);
338
339 HRESULT WINAPI D3DXCreateCubeTextureFromFileW(  LPDIRECT3DDEVICE9 device,
340                                                 LPCWSTR srcfile,
341                                                 LPDIRECT3DCUBETEXTURE9 *cube);
342 #define        D3DXCreateCubeTextureFromFile WINELIB_NAME_AW(D3DXCreateCubeTextureFromFile)
343
344 HRESULT WINAPI D3DXCreateVolumeTextureFromFileA(LPDIRECT3DDEVICE9 device,
345                                                 LPCSTR srcfile,
346                                                 LPDIRECT3DVOLUMETEXTURE9 *volume);
347
348 HRESULT WINAPI D3DXCreateVolumeTextureFromFileW(LPDIRECT3DDEVICE9 device,
349                                                 LPCWSTR srcfile,
350                                                 LPDIRECT3DVOLUMETEXTURE9 *volume);
351 #define        D3DXCreateVolumeTextureFromFile WINELIB_NAME_AW(D3DXCreateVolumeTextureFromFile)
352
353 HRESULT WINAPI D3DXCreateTextureFromResourceA(      LPDIRECT3DDEVICE9 device,
354                                                     HMODULE srcmodule,
355                                                     LPCSTR resource,
356                                                     LPDIRECT3DTEXTURE9 *texture);
357
358 HRESULT WINAPI D3DXCreateTextureFromResourceW(      LPDIRECT3DDEVICE9 device,
359                                                     HMODULE srcmodule,
360                                                     LPCWSTR resource,
361                                                     LPDIRECT3DTEXTURE9 *texture);
362 #define        D3DXCreateTextureFromResource WINELIB_NAME_AW(D3DXCreateTextureFromResource)
363
364 HRESULT WINAPI D3DXCreateCubeTextureFromResourceA(  LPDIRECT3DDEVICE9 device,
365                                                     HMODULE srcmodule,
366                                                     LPCSTR resource,
367                                                     LPDIRECT3DCUBETEXTURE9 *cube);
368 HRESULT WINAPI D3DXCreateCubeTextureFromResourceW(  LPDIRECT3DDEVICE9 device,
369                                                     HMODULE srcmodule,
370                                                     LPCWSTR resource,
371                                                     LPDIRECT3DCUBETEXTURE9 *cube);
372 #define        D3DXCreateCubeTextureFromResource WINELIB_NAME_AW(D3DXCreateCubeTextureFromResource)
373
374 HRESULT WINAPI D3DXCreateVolumeTextureFromResourceA(LPDIRECT3DDEVICE9 device,
375                                                     HMODULE srcmodule,
376                                                     LPCSTR resource,
377                                                     LPDIRECT3DVOLUMETEXTURE9 *volume);
378 HRESULT WINAPI D3DXCreateVolumeTextureFromResourceW(LPDIRECT3DDEVICE9 device,
379                                                     HMODULE srcmodule,
380                                                     LPCWSTR resource,
381                                                     LPDIRECT3DVOLUMETEXTURE9 *volume);
382 #define        D3DXCreateVolumeTextureFromResource WINELIB_NAME_AW(D3DXCreateVolumeTextureFromResource)
383
384 HRESULT WINAPI D3DXCreateTextureFromFileExA(      LPDIRECT3DDEVICE9 device,
385                                                   LPCSTR srcfile,
386                                                   UINT width,
387                                                   UINT height,
388                                                   UINT miplevels,
389                                                   DWORD usage,
390                                                   D3DFORMAT format,
391                                                   D3DPOOL pool,
392                                                   DWORD filter,
393                                                   DWORD mipfilter,
394                                                   D3DCOLOR colorkey,
395                                                   D3DXIMAGE_INFO *srcinfo,
396                                                   PALETTEENTRY *palette,
397                                                   LPDIRECT3DTEXTURE9 *texture);
398
399 HRESULT WINAPI D3DXCreateTextureFromFileExW(      LPDIRECT3DDEVICE9 device,
400                                                   LPCWSTR srcfile,
401                                                   UINT width,
402                                                   UINT height,
403                                                   UINT miplevels,
404                                                   DWORD usage,
405                                                   D3DFORMAT format,
406                                                   D3DPOOL pool,
407                                                   DWORD filter,
408                                                   DWORD mipfilter,
409                                                   D3DCOLOR colorkey,
410                                                   D3DXIMAGE_INFO *srcinfo,
411                                                   PALETTEENTRY *palette,
412                                                   LPDIRECT3DTEXTURE9 *texture);
413 #define        D3DXCreateTextureFromFileEx WINELIB_NAME_AW(D3DXCreateTextureFromFileEx)
414
415 HRESULT WINAPI D3DXCreateCubeTextureFromFileExA(  LPDIRECT3DDEVICE9 device,
416                                                   LPCSTR srcfile,
417                                                   UINT size,
418                                                   UINT miplevels,
419                                                   DWORD usage,
420                                                   D3DFORMAT format,
421                                                   D3DPOOL pool,
422                                                   DWORD filter,
423                                                   DWORD mipfilter,
424                                                   D3DCOLOR colorkey,
425                                                   D3DXIMAGE_INFO *srcinfo,
426                                                   PALETTEENTRY *palette,
427                                                   LPDIRECT3DCUBETEXTURE9 *cube);
428
429 HRESULT WINAPI D3DXCreateCubeTextureFromFileExW(  LPDIRECT3DDEVICE9 device,
430                                                   LPCWSTR srcfile,
431                                                   UINT size,
432                                                   UINT miplevels,
433                                                   DWORD usage,
434                                                   D3DFORMAT format,
435                                                   D3DPOOL pool,
436                                                   DWORD filter,
437                                                   DWORD mipfilter,
438                                                   D3DCOLOR colorkey,
439                                                   D3DXIMAGE_INFO *srcinfo,
440                                                   PALETTEENTRY *palette,
441                                                   LPDIRECT3DCUBETEXTURE9 *cube);
442 #define        D3DXCreateCubeTextureFromFileEx WINELIB_NAME_AW(D3DXCreateCubeTextureFromFileEx)
443
444 HRESULT WINAPI D3DXCreateVolumeTextureFromFileExA(LPDIRECT3DDEVICE9 device,
445                                                   LPCSTR srcfile,
446                                                   UINT width,
447                                                   UINT height,
448                                                   UINT depth,
449                                                   UINT miplevels,
450                                                   DWORD usage,
451                                                   D3DFORMAT format,
452                                                   D3DPOOL pool,
453                                                   DWORD filter,
454                                                   DWORD mipfilter,
455                                                   D3DCOLOR colorkey,
456                                                   D3DXIMAGE_INFO *srcinfo,
457                                                   PALETTEENTRY *palette,
458                                                   LPDIRECT3DVOLUMETEXTURE9 *volume);
459
460 HRESULT WINAPI D3DXCreateVolumeTextureFromFileExW(LPDIRECT3DDEVICE9 device,
461                                                   LPCWSTR srcfile,
462                                                   UINT width,
463                                                   UINT height,
464                                                   UINT depth,
465                                                   UINT miplevels,
466                                                   DWORD usage,
467                                                   D3DFORMAT format,
468                                                   D3DPOOL pool,
469                                                   DWORD filter,
470                                                   DWORD mipfilter,
471                                                   D3DCOLOR colorkey,
472                                                   D3DXIMAGE_INFO *srcinfo,
473                                                   PALETTEENTRY *palette,
474                                                   LPDIRECT3DVOLUMETEXTURE9 *volume);
475 #define        D3DXCreateVolumeTextureFromFileEx WINELIB_NAME_AW(D3DXCreateVolumeTextureFromFileEx)
476
477 HRESULT WINAPI D3DXCreateTextureFromResourceExA(      LPDIRECT3DDEVICE9 device,
478                                                       HMODULE srcmodule,
479                                                       LPCSTR resource,
480                                                       UINT width,
481                                                       UINT height,
482                                                       UINT miplevels,
483                                                       DWORD usage,
484                                                       D3DFORMAT format,
485                                                       D3DPOOL pool,
486                                                       DWORD filter,
487                                                       DWORD mipfilter,
488                                                       D3DCOLOR colorkey,
489                                                       D3DXIMAGE_INFO *srcinfo,
490                                                       PALETTEENTRY *palette,
491                                                       LPDIRECT3DTEXTURE9 *texture);
492
493 HRESULT WINAPI D3DXCreateTextureFromResourceExW(      LPDIRECT3DDEVICE9 device,
494                                                       HMODULE srcmodule,
495                                                       LPCWSTR resource,
496                                                       UINT width,
497                                                       UINT height,
498                                                       UINT miplevels,
499                                                       DWORD usage,
500                                                       D3DFORMAT format,
501                                                       D3DPOOL pool,
502                                                       DWORD filter,
503                                                       DWORD mipfilter,
504                                                       D3DCOLOR colorkey,
505                                                       D3DXIMAGE_INFO *srcinfo,
506                                                       PALETTEENTRY *palette,
507                                                       LPDIRECT3DTEXTURE9 *texture);
508 #define        D3DXCreateTextureFromResourceEx WINELIB_NAME_AW(D3DXCreateTextureFromResourceEx)
509
510 HRESULT WINAPI D3DXCreateCubeTextureFromResourceExA(  LPDIRECT3DDEVICE9 device,
511                                                       HMODULE srcmodule,
512                                                       LPCSTR resource,
513                                                       UINT size,
514                                                       UINT miplevels,
515                                                       DWORD usage,
516                                                       D3DFORMAT format,
517                                                       D3DPOOL pool,
518                                                       DWORD filter,
519                                                       DWORD mipfilter,
520                                                       D3DCOLOR colorkey,
521                                                       D3DXIMAGE_INFO *srcinfo,
522                                                       PALETTEENTRY *palette,
523                                                       LPDIRECT3DCUBETEXTURE9 *cube);
524
525 HRESULT WINAPI D3DXCreateCubeTextureFromResourceExW(  LPDIRECT3DDEVICE9 device,
526                                                       HMODULE srcmodule,
527                                                       LPCWSTR resource,
528                                                       UINT size,
529                                                       UINT miplevels,
530                                                       DWORD usage,
531                                                       D3DFORMAT format,
532                                                       D3DPOOL pool,
533                                                       DWORD filter,
534                                                       DWORD mipfilter,
535                                                       D3DCOLOR colorkey,
536                                                       D3DXIMAGE_INFO *srcinfo,
537                                                       PALETTEENTRY *palette,
538                                                       LPDIRECT3DCUBETEXTURE9 *cube);
539 #define        D3DXCreateCubeTextureFromResourceEx WINELIB_NAME_AW(D3DXCreateCubeTextureFromResourceEx)
540
541 HRESULT WINAPI D3DXCreateVolumeTextureFromResourceExA(LPDIRECT3DDEVICE9 device,
542                                                       HMODULE srcmodule,
543                                                       LPCSTR resource,
544                                                       UINT width,
545                                                       UINT height,
546                                                       UINT depth,
547                                                       UINT miplevels,
548                                                       DWORD usage,
549                                                       D3DFORMAT format,
550                                                       D3DPOOL pool,
551                                                       DWORD filter,
552                                                       DWORD mipfilter,
553                                                       D3DCOLOR colorkey,
554                                                       D3DXIMAGE_INFO *srcinfo,
555                                                       PALETTEENTRY *palette,
556                                                       LPDIRECT3DVOLUMETEXTURE9 *volume);
557
558 HRESULT WINAPI D3DXCreateVolumeTextureFromResourceExW(LPDIRECT3DDEVICE9 device,
559                                                       HMODULE srcmodule,
560                                                       LPCWSTR resource,
561                                                       UINT width,
562                                                       UINT height,
563                                                       UINT depth,
564                                                       UINT miplevels,
565                                                       DWORD usage,
566                                                       D3DFORMAT format,
567                                                       D3DPOOL pool,
568                                                       DWORD filter,
569                                                       DWORD mipfilter,
570                                                       D3DCOLOR colorkey,
571                                                       D3DXIMAGE_INFO *srcinfo,
572                                                       PALETTEENTRY *palette,
573                                                       LPDIRECT3DVOLUMETEXTURE9 *volume);
574 #define        D3DXCreateVolumeTextureFromResourceEx WINELIB_NAME_AW(D3DXCreateVolumeTextureFromResourceEx)
575
576 HRESULT WINAPI D3DXCreateTextureFromFileInMemory(      LPDIRECT3DDEVICE9 device,
577                                                        LPCVOID srcdata,
578                                                        UINT srcdatasize,
579                                                        LPDIRECT3DTEXTURE9* texture);
580
581 HRESULT WINAPI D3DXCreateCubeTextureFromFileInMemory(  LPDIRECT3DDEVICE9 device,
582                                                        LPCVOID srcdata,
583                                                        UINT srcdatasize,
584                                                        LPDIRECT3DCUBETEXTURE9* cube);
585
586 HRESULT WINAPI D3DXCreateVolumeTextureFromFileInMemory(LPDIRECT3DDEVICE9 device,
587                                                        LPCVOID srcdata,
588                                                        UINT srcdatasize,
589                                                        LPDIRECT3DVOLUMETEXTURE9 *volume);
590
591 HRESULT WINAPI D3DXCreateTextureFromFileInMemoryEx(      LPDIRECT3DDEVICE9 device,
592                                                          LPCVOID srcdata,
593                                                          UINT srcdatasize,
594                                                          UINT width,
595                                                          UINT height,
596                                                          UINT miplevels,
597                                                          DWORD usage,
598                                                          D3DFORMAT format,
599                                                          D3DPOOL pool,
600                                                          DWORD filter,
601                                                          DWORD mipfilter,
602                                                          D3DCOLOR colorkey,
603                                                          D3DXIMAGE_INFO *srcinfo,
604                                                          PALETTEENTRY *palette,
605                                                          LPDIRECT3DTEXTURE9 *texture);
606
607 HRESULT WINAPI D3DXCreateCubeTextureFromFileInMemoryEx(  LPDIRECT3DDEVICE9 device,
608                                                          LPCVOID srcdata,
609                                                          UINT srcdatasize,
610                                                          UINT size,
611                                                          UINT miplevels,
612                                                          DWORD usage,
613                                                          D3DFORMAT format,
614                                                          D3DPOOL pool,
615                                                          DWORD filter,
616                                                          DWORD mipfilter,
617                                                          D3DCOLOR colorkey,
618                                                          D3DXIMAGE_INFO *srcinfo,
619                                                          PALETTEENTRY *palette,
620                                                          LPDIRECT3DCUBETEXTURE9 *cube);
621
622 HRESULT WINAPI D3DXCreateVolumeTextureFromFileInMemoryEx(LPDIRECT3DDEVICE9 device,
623                                                          LPCVOID srcdata,
624                                                          UINT srcdatasize,
625                                                          UINT width,
626                                                          UINT height,
627                                                          UINT depth,
628                                                          UINT miplevels,
629                                                          DWORD usage,
630                                                          D3DFORMAT format,
631                                                          D3DPOOL pool,
632                                                          DWORD filter,
633                                                          DWORD mipfilter,
634                                                          D3DCOLOR colorkey,
635                                                          D3DXIMAGE_INFO *srcinfo,
636                                                          PALETTEENTRY *palette,
637                                                          LPDIRECT3DVOLUMETEXTURE9 *volume);
638
639 HRESULT WINAPI D3DXSaveTextureToFileA(LPCSTR destfile,
640                                       D3DXIMAGE_FILEFORMAT destformat,
641                                       LPDIRECT3DBASETEXTURE9 srctexture,
642                                       CONST PALETTEENTRY *srcpalette);
643 HRESULT WINAPI D3DXSaveTextureToFileW(LPCWSTR destfile,
644                                       D3DXIMAGE_FILEFORMAT destformat,
645                                       LPDIRECT3DBASETEXTURE9 srctexture,
646                                       CONST PALETTEENTRY *srcpalette);
647 #define        D3DXSaveTextureToFile WINELIB_NAME_AW(D3DXSaveTextureToFile)
648
649
650 /* Other functions */
651 HRESULT WINAPI D3DXFilterTexture(      LPDIRECT3DBASETEXTURE9 texture,
652                                        CONST PALETTEENTRY *palette,
653                                        UINT srclevel,
654                                        DWORD filter);
655 #define D3DXFilterCubeTexture D3DXFilterTexture
656 #define D3DXFilterVolumeTexture D3DXFilterTexture
657
658 HRESULT WINAPI D3DXFillTexture(        LPDIRECT3DTEXTURE9 texture,
659                                        LPD3DXFILL2D function,
660                                        LPVOID data);
661
662 HRESULT WINAPI D3DXFillCubeTexture(    LPDIRECT3DCUBETEXTURE9 cube,
663                                        LPD3DXFILL3D function,
664                                        LPVOID data);
665
666 HRESULT WINAPI D3DXFillVolumeTexture(  LPDIRECT3DVOLUMETEXTURE9 volume,
667                                        LPD3DXFILL3D function,
668                                        LPVOID data);
669
670 HRESULT WINAPI D3DXFillTextureTX(      LPDIRECT3DTEXTURE9 texture,
671                                        CONST DWORD *function,
672                                        CONST D3DXVECTOR4 *constants,
673                                        UINT numconstants);
674
675 HRESULT WINAPI D3DXFillCubeTextureTX(  LPDIRECT3DCUBETEXTURE9 cube,
676                                        CONST DWORD *function,
677                                        CONST D3DXVECTOR4 *constants,
678                                        UINT numconstants);
679
680 HRESULT WINAPI D3DXFillVolumeTextureTX(LPDIRECT3DVOLUMETEXTURE9 volume,
681                                        CONST DWORD *function,
682                                        CONST D3DXVECTOR4 *constants,
683                                        UINT numconstants);
684
685 HRESULT WINAPI D3DXComputeNormalMap(   LPDIRECT3DTEXTURE9 texture,
686                                        LPDIRECT3DTEXTURE9 srctexture,
687                                        CONST PALETTEENTRY *srcpalette,
688                                        DWORD flags,
689                                        DWORD channel,
690                                        FLOAT amplitude);
691
692
693 #ifdef __cplusplus
694 }
695 #endif
696
697 #endif /* __WINE_D3DX9TEX_H */