| 1 | #include <_mingw_unicode.h> |
| 2 | /* |
| 3 | * Copyright (C) 2008 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_D3DX9TEX_H |
| 23 | #define __WINE_D3DX9TEX_H |
| 24 | |
| 25 | /********************************************** |
| 26 | ***************** Definitions **************** |
| 27 | **********************************************/ |
| 28 | #define D3DX_FILTER_NONE 0x00000001 |
| 29 | #define D3DX_FILTER_POINT 0x00000002 |
| 30 | #define D3DX_FILTER_LINEAR 0x00000003 |
| 31 | #define D3DX_FILTER_TRIANGLE 0x00000004 |
| 32 | #define D3DX_FILTER_BOX 0x00000005 |
| 33 | #define D3DX_FILTER_MIRROR_U 0x00010000 |
| 34 | #define D3DX_FILTER_MIRROR_V 0x00020000 |
| 35 | #define D3DX_FILTER_MIRROR_W 0x00040000 |
| 36 | #define D3DX_FILTER_MIRROR 0x00070000 |
| 37 | #define D3DX_FILTER_DITHER 0x00080000 |
| 38 | #define D3DX_FILTER_DITHER_DIFFUSION 0x00100000 |
| 39 | #define D3DX_FILTER_SRGB_IN 0x00200000 |
| 40 | #define D3DX_FILTER_SRGB_OUT 0x00400000 |
| 41 | #define D3DX_FILTER_SRGB 0x00600000 |
| 42 | |
| 43 | #define D3DX_SKIP_DDS_MIP_LEVELS_MASK 0x1f |
| 44 | #define D3DX_SKIP_DDS_MIP_LEVELS_SHIFT 26 |
| 45 | #define D3DX_SKIP_DDS_MIP_LEVELS(l, f) ((((l) & D3DX_SKIP_DDS_MIP_LEVELS_MASK) \ |
| 46 | << D3DX_SKIP_DDS_MIP_LEVELS_SHIFT) | ((f) == D3DX_DEFAULT ? D3DX_FILTER_BOX : (f))) |
| 47 | |
| 48 | #define D3DX_NORMALMAP_MIRROR_U 0x00010000 |
| 49 | #define D3DX_NORMALMAP_MIRROR_V 0x00020000 |
| 50 | #define D3DX_NORMALMAP_MIRROR 0x00030000 |
| 51 | #define D3DX_NORMALMAP_INVERTSIGN 0x00080000 |
| 52 | #define D3DX_NORMALMAP_COMPUTE_OCCLUSION 0x00100000 |
| 53 | |
| 54 | #define D3DX_CHANNEL_RED 0x00000001 |
| 55 | #define D3DX_CHANNEL_BLUE 0x00000002 |
| 56 | #define D3DX_CHANNEL_GREEN 0x00000004 |
| 57 | #define D3DX_CHANNEL_ALPHA 0x00000008 |
| 58 | #define D3DX_CHANNEL_LUMINANCE 0x00000010 |
| 59 | |
| 60 | /********************************************** |
| 61 | ****************** Typedefs ****************** |
| 62 | **********************************************/ |
| 63 | typedef enum _D3DXIMAGE_FILEFORMAT |
| 64 | { |
| 65 | D3DXIFF_BMP, |
| 66 | D3DXIFF_JPG, |
| 67 | D3DXIFF_TGA, |
| 68 | D3DXIFF_PNG, |
| 69 | D3DXIFF_DDS, |
| 70 | D3DXIFF_PPM, |
| 71 | D3DXIFF_DIB, |
| 72 | D3DXIFF_HDR, |
| 73 | D3DXIFF_PFM, |
| 74 | D3DXIFF_FORCE_DWORD = 0x7fffffff |
| 75 | } D3DXIMAGE_FILEFORMAT; |
| 76 | |
| 77 | typedef struct _D3DXIMAGE_INFO |
| 78 | { |
| 79 | UINT Width; |
| 80 | UINT Height; |
| 81 | UINT Depth; |
| 82 | UINT MipLevels; |
| 83 | D3DFORMAT Format; |
| 84 | D3DRESOURCETYPE ResourceType; |
| 85 | D3DXIMAGE_FILEFORMAT ImageFileFormat; |
| 86 | } D3DXIMAGE_INFO; |
| 87 | |
| 88 | /********************************************** |
| 89 | ****************** Functions ***************** |
| 90 | **********************************************/ |
| 91 | /* Typedefs for callback functions */ |
| 92 | typedef void (WINAPI *LPD3DXFILL2D)(D3DXVECTOR4 *out, const D3DXVECTOR2 *texcoord, |
| 93 | const D3DXVECTOR2 *texelsize, void *data); |
| 94 | typedef void (WINAPI *LPD3DXFILL3D)(D3DXVECTOR4 *out, const D3DXVECTOR3 *texcoord, |
| 95 | const D3DXVECTOR3 *texelsize, void *data); |
| 96 | |
| 97 | #ifdef __cplusplus |
| 98 | extern "C" { |
| 99 | #endif |
| 100 | |
| 101 | |
| 102 | /* Image Information */ |
| 103 | HRESULT WINAPI D3DXGetImageInfoFromFileA(const char *file, D3DXIMAGE_INFO *info); |
| 104 | HRESULT WINAPI D3DXGetImageInfoFromFileW(const WCHAR *file, D3DXIMAGE_INFO *info); |
| 105 | #define D3DXGetImageInfoFromFile __MINGW_NAME_AW(D3DXGetImageInfoFromFile) |
| 106 | |
| 107 | HRESULT WINAPI D3DXGetImageInfoFromResourceA(HMODULE module, const char *resource, D3DXIMAGE_INFO *info); |
| 108 | HRESULT WINAPI D3DXGetImageInfoFromResourceW(HMODULE module, const WCHAR *resource, D3DXIMAGE_INFO *info); |
| 109 | #define D3DXGetImageInfoFromResource __MINGW_NAME_AW(D3DXGetImageInfoFromResource) |
| 110 | |
| 111 | HRESULT WINAPI D3DXGetImageInfoFromFileInMemory(const void *data, UINT data_size, D3DXIMAGE_INFO *info); |
| 112 | |
| 113 | |
| 114 | /* Surface Loading/Saving */ |
| 115 | HRESULT WINAPI D3DXLoadSurfaceFromFileA(struct IDirect3DSurface9 *destsurface, |
| 116 | const PALETTEENTRY *destpalette, const RECT *destrect, const char *srcfile, |
| 117 | const RECT *srcrect, DWORD filter, D3DCOLOR colorkey, D3DXIMAGE_INFO *srcinfo); |
| 118 | HRESULT WINAPI D3DXLoadSurfaceFromFileW(struct IDirect3DSurface9 *destsurface, |
| 119 | const PALETTEENTRY *destpalette, const RECT *destrect, const WCHAR *srcfile, |
| 120 | const RECT *srcrect, DWORD filter, D3DCOLOR colorkey, D3DXIMAGE_INFO *srcinfo); |
| 121 | #define D3DXLoadSurfaceFromFile __MINGW_NAME_AW(D3DXLoadSurfaceFromFile) |
| 122 | |
| 123 | HRESULT WINAPI D3DXLoadSurfaceFromResourceA(struct IDirect3DSurface9 *destsurface, |
| 124 | const PALETTEENTRY *destpalette, const RECT *destrect, HMODULE srcmodule, const char *resource, |
| 125 | const RECT *srcrect, DWORD filter, D3DCOLOR colorkey, D3DXIMAGE_INFO *srcinfo); |
| 126 | HRESULT WINAPI D3DXLoadSurfaceFromResourceW(struct IDirect3DSurface9 *destsurface, |
| 127 | const PALETTEENTRY *destpalette, const RECT *destrect, HMODULE srcmodule, const WCHAR *resource, |
| 128 | const RECT *srcrect, DWORD filter, D3DCOLOR colorkey, D3DXIMAGE_INFO *srcinfo); |
| 129 | #define D3DXLoadSurfaceFromResource __MINGW_NAME_AW(D3DXLoadSurfaceFromResource) |
| 130 | |
| 131 | HRESULT WINAPI D3DXLoadSurfaceFromFileInMemory(struct IDirect3DSurface9 *destsurface, |
| 132 | const PALETTEENTRY *destpalette, const RECT *destrect, const void *srcdata, UINT srcdatasize, |
| 133 | const RECT *srcrect, DWORD filter, D3DCOLOR colorkey, D3DXIMAGE_INFO *srcinfo); |
| 134 | |
| 135 | HRESULT WINAPI D3DXLoadSurfaceFromSurface(struct IDirect3DSurface9 *destsurface, |
| 136 | const PALETTEENTRY *destpalette, const RECT *destrect, struct IDirect3DSurface9 *srcsurface, |
| 137 | const PALETTEENTRY *srcpalette, const RECT *srcrect, DWORD filter, D3DCOLOR colorkey); |
| 138 | |
| 139 | HRESULT WINAPI D3DXLoadSurfaceFromMemory(IDirect3DSurface9 *dst_surface, |
| 140 | const PALETTEENTRY *dst_palette, const RECT *dst_rect, const void *src_memory, |
| 141 | D3DFORMAT src_format, UINT src_pitch, const PALETTEENTRY *src_palette, const RECT *src_rect, |
| 142 | DWORD filter, D3DCOLOR color_key); |
| 143 | |
| 144 | HRESULT WINAPI D3DXSaveSurfaceToFileInMemory(struct ID3DXBuffer **destbuffer, |
| 145 | D3DXIMAGE_FILEFORMAT destformat, struct IDirect3DSurface9 *srcsurface, |
| 146 | const PALETTEENTRY *srcpalette, const RECT *srcrect); |
| 147 | |
| 148 | HRESULT WINAPI D3DXSaveSurfaceToFileA(const char *destfile, D3DXIMAGE_FILEFORMAT destformat, |
| 149 | struct IDirect3DSurface9 *srcsurface, const PALETTEENTRY *srcpalette, const RECT *srcrect); |
| 150 | HRESULT WINAPI D3DXSaveSurfaceToFileW(const WCHAR *destfile, D3DXIMAGE_FILEFORMAT destformat, |
| 151 | struct IDirect3DSurface9 *srcsurface, const PALETTEENTRY *srcpalette, const RECT *srcrect); |
| 152 | #define D3DXSaveSurfaceToFile __MINGW_NAME_AW(D3DXSaveSurfaceToFile) |
| 153 | |
| 154 | |
| 155 | /* Volume Loading/Saving */ |
| 156 | HRESULT WINAPI D3DXLoadVolumeFromFileA(struct IDirect3DVolume9 *destvolume, |
| 157 | const PALETTEENTRY *destpalette, const D3DBOX *destbox, const char *srcfile, |
| 158 | const D3DBOX *srcbox, DWORD filter, D3DCOLOR colorkey, D3DXIMAGE_INFO *srcinfo); |
| 159 | HRESULT WINAPI D3DXLoadVolumeFromFileW( struct IDirect3DVolume9 *destvolume, |
| 160 | const PALETTEENTRY *destpalette, const D3DBOX *destbox, const WCHAR *srcfile, |
| 161 | const D3DBOX *srcbox, DWORD filter, D3DCOLOR colorkey, D3DXIMAGE_INFO *srcinfo); |
| 162 | #define D3DXLoadVolumeFromFile __MINGW_NAME_AW(D3DXLoadVolumeFromFile) |
| 163 | |
| 164 | HRESULT WINAPI D3DXLoadVolumeFromResourceA(struct IDirect3DVolume9 *destvolume, |
| 165 | const PALETTEENTRY *destpalette, const D3DBOX *destbox, HMODULE srcmodule, const char *resource, |
| 166 | const D3DBOX *srcbox, DWORD filter, D3DCOLOR colorkey, D3DXIMAGE_INFO *srcinfo); |
| 167 | HRESULT WINAPI D3DXLoadVolumeFromResourceW(struct IDirect3DVolume9 *destvolume, |
| 168 | const PALETTEENTRY *destpalette, const D3DBOX *destbox, HMODULE srcmodule, const WCHAR *resource, |
| 169 | const D3DBOX *srcbox, DWORD filter, D3DCOLOR colorkey, D3DXIMAGE_INFO *srcinfo); |
| 170 | #define D3DXLoadVolumeFromResource __MINGW_NAME_AW(D3DXLoadVolumeFromResource) |
| 171 | |
| 172 | HRESULT WINAPI D3DXLoadVolumeFromFileInMemory(struct IDirect3DVolume9 *destvolume, |
| 173 | const PALETTEENTRY *destpalette, const D3DBOX *destbox, const void *srcdata, UINT srcdatasize, |
| 174 | const D3DBOX *srcbox, DWORD filter, D3DCOLOR colorkey, D3DXIMAGE_INFO *srcinfo); |
| 175 | |
| 176 | HRESULT WINAPI D3DXLoadVolumeFromVolume(struct IDirect3DVolume9 *destvolume, |
| 177 | const PALETTEENTRY *destpalette, const D3DBOX *destbox, struct IDirect3DVolume9 *srcvolume, |
| 178 | const PALETTEENTRY *srcpalette, const D3DBOX *srcbox, DWORD filter, D3DCOLOR colorkey); |
| 179 | |
| 180 | HRESULT WINAPI D3DXLoadVolumeFromMemory(struct IDirect3DVolume9 *destvolume, |
| 181 | const PALETTEENTRY *destpalette, const D3DBOX *destbox, const void *srcmemory, |
| 182 | D3DFORMAT srcformat, UINT srcrowpitch, UINT srcslicepitch, const PALETTEENTRY *srcpalette, |
| 183 | const D3DBOX *srcbox, DWORD filter, D3DCOLOR colorkey); |
| 184 | |
| 185 | HRESULT WINAPI D3DXSaveVolumeToFileInMemory(struct ID3DXBuffer **dst_buffer, D3DXIMAGE_FILEFORMAT dst_format, |
| 186 | struct IDirect3DVolume9 *src_volume, const PALETTEENTRY *src_palette, const D3DBOX *src_box); |
| 187 | |
| 188 | HRESULT WINAPI D3DXSaveVolumeToFileA(const char *destfile, D3DXIMAGE_FILEFORMAT destformat, |
| 189 | struct IDirect3DVolume9 *srcvolume, const PALETTEENTRY *srcpalette, const D3DBOX *srcbox); |
| 190 | HRESULT WINAPI D3DXSaveVolumeToFileW(const WCHAR *destfile, D3DXIMAGE_FILEFORMAT destformat, |
| 191 | struct IDirect3DVolume9 *srcvolume, const PALETTEENTRY *srcpalette, const D3DBOX *srcbox); |
| 192 | #define D3DXSaveVolumeToFile __MINGW_NAME_AW(D3DXSaveVolumeToFile) |
| 193 | |
| 194 | |
| 195 | /* Texture, cube texture and volume texture creation */ |
| 196 | HRESULT WINAPI D3DXCheckTextureRequirements(struct IDirect3DDevice9 *device, UINT *width, UINT *height, |
| 197 | UINT *miplevels, DWORD usage, D3DFORMAT *format, D3DPOOL pool); |
| 198 | HRESULT WINAPI D3DXCheckCubeTextureRequirements(struct IDirect3DDevice9 *device, UINT *size, |
| 199 | UINT *miplevels, DWORD usage, D3DFORMAT *format, D3DPOOL pool); |
| 200 | HRESULT WINAPI D3DXCheckVolumeTextureRequirements(struct IDirect3DDevice9 *device, UINT *width, UINT *height, |
| 201 | UINT *depth, UINT *miplevels, DWORD usage, D3DFORMAT *format, D3DPOOL pool); |
| 202 | |
| 203 | HRESULT WINAPI D3DXCreateTexture(struct IDirect3DDevice9 *device, UINT width, UINT height, |
| 204 | UINT miplevels, DWORD usage, D3DFORMAT format, D3DPOOL pool, struct IDirect3DTexture9 **texture); |
| 205 | HRESULT WINAPI D3DXCreateCubeTexture(struct IDirect3DDevice9 *device, UINT size, |
| 206 | UINT miplevels, DWORD usage, D3DFORMAT format, D3DPOOL pool, struct IDirect3DCubeTexture9 **cube); |
| 207 | HRESULT WINAPI D3DXCreateVolumeTexture(struct IDirect3DDevice9 *device, UINT width, UINT height, UINT depth, |
| 208 | UINT miplevels, DWORD usage, D3DFORMAT format, D3DPOOL pool, struct IDirect3DVolumeTexture9 **volume); |
| 209 | |
| 210 | HRESULT WINAPI D3DXCreateTextureFromFileA(struct IDirect3DDevice9 *device, |
| 211 | const char *srcfile, struct IDirect3DTexture9 **texture); |
| 212 | HRESULT WINAPI D3DXCreateTextureFromFileW(struct IDirect3DDevice9 *device, |
| 213 | const WCHAR *srcfile, struct IDirect3DTexture9 **texture); |
| 214 | #define D3DXCreateTextureFromFile __MINGW_NAME_AW(D3DXCreateTextureFromFile) |
| 215 | |
| 216 | HRESULT WINAPI D3DXCreateCubeTextureFromFileA(struct IDirect3DDevice9 *device, |
| 217 | const char *srcfile, struct IDirect3DCubeTexture9 **cube); |
| 218 | HRESULT WINAPI D3DXCreateCubeTextureFromFileW(struct IDirect3DDevice9 *device, |
| 219 | const WCHAR *srcfile, struct IDirect3DCubeTexture9 **cube); |
| 220 | #define D3DXCreateCubeTextureFromFile __MINGW_NAME_AW(D3DXCreateCubeTextureFromFile) |
| 221 | |
| 222 | HRESULT WINAPI D3DXCreateVolumeTextureFromFileA(struct IDirect3DDevice9 *device, |
| 223 | const char *srcfile, struct IDirect3DVolumeTexture9 **volume); |
| 224 | HRESULT WINAPI D3DXCreateVolumeTextureFromFileW(struct IDirect3DDevice9 *device, |
| 225 | const WCHAR *srcfile, struct IDirect3DVolumeTexture9 **volume); |
| 226 | #define D3DXCreateVolumeTextureFromFile __MINGW_NAME_AW(D3DXCreateVolumeTextureFromFile) |
| 227 | |
| 228 | HRESULT WINAPI D3DXCreateTextureFromResourceA(struct IDirect3DDevice9 *device, |
| 229 | HMODULE srcmodule, const char *resource, struct IDirect3DTexture9 **texture); |
| 230 | HRESULT WINAPI D3DXCreateTextureFromResourceW(struct IDirect3DDevice9 *device, |
| 231 | HMODULE srcmodule, const WCHAR *resource, struct IDirect3DTexture9 **texture); |
| 232 | #define D3DXCreateTextureFromResource __MINGW_NAME_AW(D3DXCreateTextureFromResource) |
| 233 | |
| 234 | HRESULT WINAPI D3DXCreateCubeTextureFromResourceA(struct IDirect3DDevice9 *device, |
| 235 | HMODULE srcmodule, const char *resource, struct IDirect3DCubeTexture9 **cube); |
| 236 | HRESULT WINAPI D3DXCreateCubeTextureFromResourceW(struct IDirect3DDevice9 *device, |
| 237 | HMODULE srcmodule, const WCHAR *resource, struct IDirect3DCubeTexture9 **cube); |
| 238 | #define D3DXCreateCubeTextureFromResource __MINGW_NAME_AW(D3DXCreateCubeTextureFromResource) |
| 239 | |
| 240 | HRESULT WINAPI D3DXCreateVolumeTextureFromResourceA(struct IDirect3DDevice9 *device, |
| 241 | HMODULE srcmodule, const char *resource, struct IDirect3DVolumeTexture9 **volume); |
| 242 | HRESULT WINAPI D3DXCreateVolumeTextureFromResourceW(struct IDirect3DDevice9 *device, |
| 243 | HMODULE srcmodule, const WCHAR *resource, struct IDirect3DVolumeTexture9 **volume); |
| 244 | #define D3DXCreateVolumeTextureFromResource __MINGW_NAME_AW(D3DXCreateVolumeTextureFromResource) |
| 245 | |
| 246 | HRESULT WINAPI D3DXCreateTextureFromFileExA(struct IDirect3DDevice9 *device, const char *srcfile, |
| 247 | UINT width, UINT height, UINT miplevels, DWORD usage, D3DFORMAT format, |
| 248 | D3DPOOL pool, DWORD filter, DWORD mipfilter, D3DCOLOR colorkey, D3DXIMAGE_INFO *srcinfo, |
| 249 | PALETTEENTRY *palette, struct IDirect3DTexture9 **texture); |
| 250 | HRESULT WINAPI D3DXCreateTextureFromFileExW(struct IDirect3DDevice9 *device, const WCHAR *srcfile, |
| 251 | UINT width, UINT height, UINT miplevels, DWORD usage, D3DFORMAT format, |
| 252 | D3DPOOL pool, DWORD filter, DWORD mipfilter, D3DCOLOR colorkey, D3DXIMAGE_INFO *srcinfo, |
| 253 | PALETTEENTRY *palette, struct IDirect3DTexture9 **texture); |
| 254 | #define D3DXCreateTextureFromFileEx __MINGW_NAME_AW(D3DXCreateTextureFromFileEx) |
| 255 | |
| 256 | HRESULT WINAPI D3DXCreateCubeTextureFromFileExA(struct IDirect3DDevice9 *device, const char *srcfile, |
| 257 | UINT size, UINT miplevels, DWORD usage, D3DFORMAT format, |
| 258 | D3DPOOL pool, DWORD filter, DWORD mipfilter, D3DCOLOR colorkey, D3DXIMAGE_INFO *srcinfo, |
| 259 | PALETTEENTRY *palette, struct IDirect3DCubeTexture9 **cube); |
| 260 | HRESULT WINAPI D3DXCreateCubeTextureFromFileExW(struct IDirect3DDevice9 *device, const WCHAR *srcfile, |
| 261 | UINT size, UINT miplevels, DWORD usage, D3DFORMAT format, |
| 262 | D3DPOOL pool, DWORD filter, DWORD mipfilter, D3DCOLOR colorkey, D3DXIMAGE_INFO *srcinfo, |
| 263 | PALETTEENTRY *palette, struct IDirect3DCubeTexture9 **cube); |
| 264 | #define D3DXCreateCubeTextureFromFileEx __MINGW_NAME_AW(D3DXCreateCubeTextureFromFileEx) |
| 265 | |
| 266 | HRESULT WINAPI D3DXCreateVolumeTextureFromFileExA(struct IDirect3DDevice9 *device, const char *srcfile, |
| 267 | UINT width, UINT height, UINT depth, UINT miplevels, DWORD usage, D3DFORMAT format, |
| 268 | D3DPOOL pool, DWORD filter, DWORD mipfilter, D3DCOLOR colorkey, D3DXIMAGE_INFO *srcinfo, |
| 269 | PALETTEENTRY *palette, struct IDirect3DVolumeTexture9 **volume); |
| 270 | HRESULT WINAPI D3DXCreateVolumeTextureFromFileExW(struct IDirect3DDevice9 *device, const WCHAR *srcfile, |
| 271 | UINT width, UINT height, UINT depth, UINT miplevels, DWORD usage, D3DFORMAT format, |
| 272 | D3DPOOL pool, DWORD filter, DWORD mipfilter, D3DCOLOR colorkey, D3DXIMAGE_INFO *srcinfo, |
| 273 | PALETTEENTRY *palette, struct IDirect3DVolumeTexture9 **volume); |
| 274 | #define D3DXCreateVolumeTextureFromFileEx __MINGW_NAME_AW(D3DXCreateVolumeTextureFromFileEx) |
| 275 | |
| 276 | HRESULT WINAPI D3DXCreateTextureFromResourceExA(struct IDirect3DDevice9 *device, HMODULE srcmodule, |
| 277 | const char *resource, UINT width, UINT height, UINT miplevels, DWORD usage, D3DFORMAT format, |
| 278 | D3DPOOL pool, DWORD filter, DWORD mipfilter, D3DCOLOR colorkey, D3DXIMAGE_INFO *srcinfo, |
| 279 | PALETTEENTRY *palette, struct IDirect3DTexture9 **texture); |
| 280 | HRESULT WINAPI D3DXCreateTextureFromResourceExW(struct IDirect3DDevice9 *device, HMODULE srcmodule, |
| 281 | const WCHAR *resource, UINT width, UINT height, UINT miplevels, DWORD usage, D3DFORMAT format, |
| 282 | D3DPOOL pool, DWORD filter, DWORD mipfilter, D3DCOLOR colorkey, D3DXIMAGE_INFO *srcinfo, |
| 283 | PALETTEENTRY *palette, struct IDirect3DTexture9 **texture); |
| 284 | #define D3DXCreateTextureFromResourceEx __MINGW_NAME_AW(D3DXCreateTextureFromResourceEx) |
| 285 | |
| 286 | HRESULT WINAPI D3DXCreateCubeTextureFromResourceExA(struct IDirect3DDevice9 *device, HMODULE srcmodule, |
| 287 | const char *resource, UINT size, UINT miplevels, DWORD usage, D3DFORMAT format, |
| 288 | D3DPOOL pool, DWORD filter, DWORD mipfilter, D3DCOLOR colorkey, D3DXIMAGE_INFO *srcinfo, |
| 289 | PALETTEENTRY *palette, struct IDirect3DCubeTexture9 **cube); |
| 290 | HRESULT WINAPI D3DXCreateCubeTextureFromResourceExW(struct IDirect3DDevice9 *device, HMODULE srcmodule, |
| 291 | const WCHAR *resource, UINT size, UINT miplevels, DWORD usage, D3DFORMAT format, |
| 292 | D3DPOOL pool, DWORD filter, DWORD mipfilter, D3DCOLOR colorkey, D3DXIMAGE_INFO *srcinfo, |
| 293 | PALETTEENTRY *palette, struct IDirect3DCubeTexture9 **cube); |
| 294 | #define D3DXCreateCubeTextureFromResourceEx __MINGW_NAME_AW(D3DXCreateCubeTextureFromResourceEx) |
| 295 | |
| 296 | HRESULT WINAPI D3DXCreateVolumeTextureFromResourceExA(struct IDirect3DDevice9 *device, HMODULE srcmodule, |
| 297 | const char *resource, UINT width, UINT height, UINT depth, UINT miplevels, DWORD usage, D3DFORMAT format, |
| 298 | D3DPOOL pool, DWORD filter, DWORD mipfilter, D3DCOLOR colorkey, D3DXIMAGE_INFO *srcinfo, |
| 299 | PALETTEENTRY *palette, struct IDirect3DVolumeTexture9 **volume); |
| 300 | HRESULT WINAPI D3DXCreateVolumeTextureFromResourceExW(struct IDirect3DDevice9 *device, HMODULE srcmodule, |
| 301 | const WCHAR *resource, UINT width, UINT height, UINT depth, UINT miplevels, DWORD usage, D3DFORMAT format, |
| 302 | D3DPOOL pool, DWORD filter, DWORD mipfilter, D3DCOLOR colorkey, D3DXIMAGE_INFO *srcinfo, |
| 303 | PALETTEENTRY *palette, struct IDirect3DVolumeTexture9 **volume); |
| 304 | #define D3DXCreateVolumeTextureFromResourceEx __MINGW_NAME_AW(D3DXCreateVolumeTextureFromResourceEx) |
| 305 | |
| 306 | HRESULT WINAPI D3DXCreateTextureFromFileInMemory(struct IDirect3DDevice9 *device, |
| 307 | const void *srcdata, UINT srcdatasize, struct IDirect3DTexture9 **texture); |
| 308 | HRESULT WINAPI D3DXCreateCubeTextureFromFileInMemory(struct IDirect3DDevice9 *device, |
| 309 | const void *srcdata, UINT srcdatasize, struct IDirect3DCubeTexture9 **cube); |
| 310 | HRESULT WINAPI D3DXCreateVolumeTextureFromFileInMemory(struct IDirect3DDevice9 *device, |
| 311 | const void *srcdata, UINT srcdatasize, struct IDirect3DVolumeTexture9 **volume); |
| 312 | |
| 313 | HRESULT WINAPI D3DXCreateTextureFromFileInMemoryEx(struct IDirect3DDevice9 *device, const void *srcdata, |
| 314 | UINT srcdatasize, UINT width, UINT height, UINT miplevels, DWORD usage, D3DFORMAT format, |
| 315 | D3DPOOL pool, DWORD filter, DWORD mipfilter, D3DCOLOR colorkey, D3DXIMAGE_INFO *srcinfo, |
| 316 | PALETTEENTRY *palette, struct IDirect3DTexture9 **texture); |
| 317 | HRESULT WINAPI D3DXCreateCubeTextureFromFileInMemoryEx(struct IDirect3DDevice9 *device, const void *srcdata, |
| 318 | UINT srcdatasize, UINT size, UINT miplevels, DWORD usage, D3DFORMAT format, |
| 319 | D3DPOOL pool, DWORD filter, DWORD mipfilter, D3DCOLOR colorkey, D3DXIMAGE_INFO *srcinfo, |
| 320 | PALETTEENTRY *palette, struct IDirect3DCubeTexture9 **cube); |
| 321 | HRESULT WINAPI D3DXCreateVolumeTextureFromFileInMemoryEx(struct IDirect3DDevice9 *device, const void *srcdata, |
| 322 | UINT srcdatasize, UINT width, UINT height, UINT depth, UINT miplevels, DWORD usage, D3DFORMAT format, |
| 323 | D3DPOOL pool, DWORD filter, DWORD mipfilter, D3DCOLOR colorkey, D3DXIMAGE_INFO *srcinfo, |
| 324 | PALETTEENTRY *palette, struct IDirect3DVolumeTexture9 **volume); |
| 325 | |
| 326 | HRESULT WINAPI D3DXSaveTextureToFileInMemory(struct ID3DXBuffer **destbuffer, D3DXIMAGE_FILEFORMAT destformat, |
| 327 | struct IDirect3DBaseTexture9 *srctexture, const PALETTEENTRY *srcpalette); |
| 328 | HRESULT WINAPI D3DXSaveTextureToFileA(const char *destfile, D3DXIMAGE_FILEFORMAT destformat, |
| 329 | struct IDirect3DBaseTexture9 *srctexture, const PALETTEENTRY *srcpalette); |
| 330 | HRESULT WINAPI D3DXSaveTextureToFileW(const WCHAR *destfile, D3DXIMAGE_FILEFORMAT destformat, |
| 331 | struct IDirect3DBaseTexture9 *srctexture, const PALETTEENTRY *srcpalette); |
| 332 | #define D3DXSaveTextureToFile __MINGW_NAME_AW(D3DXSaveTextureToFile) |
| 333 | |
| 334 | /* Other functions */ |
| 335 | HRESULT WINAPI D3DXFilterTexture(struct IDirect3DBaseTexture9 *texture, |
| 336 | const PALETTEENTRY *palette, UINT srclevel, DWORD filter); |
| 337 | #define D3DXFilterCubeTexture D3DXFilterTexture |
| 338 | #define D3DXFilterVolumeTexture D3DXFilterTexture |
| 339 | |
| 340 | HRESULT WINAPI D3DXFillTexture(struct IDirect3DTexture9 *texture, LPD3DXFILL2D function, void *data); |
| 341 | HRESULT WINAPI D3DXFillCubeTexture(struct IDirect3DCubeTexture9 *cube, LPD3DXFILL3D function, void *data); |
| 342 | HRESULT WINAPI D3DXFillVolumeTexture(struct IDirect3DVolumeTexture9 *volume, LPD3DXFILL3D function, void *data); |
| 343 | |
| 344 | HRESULT WINAPI D3DXFillTextureTX(struct IDirect3DTexture9 *texture, ID3DXTextureShader *texture_shader); |
| 345 | HRESULT WINAPI D3DXFillCubeTextureTX(struct IDirect3DCubeTexture9 *cube, ID3DXTextureShader *texture_shader); |
| 346 | HRESULT WINAPI D3DXFillVolumeTextureTX(struct IDirect3DVolumeTexture9 *volume, ID3DXTextureShader *texture_shader); |
| 347 | |
| 348 | HRESULT WINAPI D3DXComputeNormalMap(IDirect3DTexture9 *texture, IDirect3DTexture9 *srctexture, |
| 349 | const PALETTEENTRY *srcpalette, DWORD flags, DWORD channel, float amplitude); |
| 350 | |
| 351 | #ifdef __cplusplus |
| 352 | } |
| 353 | #endif |
| 354 | |
| 355 | #endif /* __WINE_D3DX9TEX_H */ |