47 ERR(
"Unexpected texture type\n");
79 IDirect3DSurface9 *topsurf, *mipsurf;
102 for (
i = 0;
i < numfaces;
i++)
104 level = srclevel + 1;
133 int level, level_count;
134 IDirect3DVolume9 *top_volume, *mip_volume;
135 IDirect3DVolumeTexture9 *volume_texture = (IDirect3DVolumeTexture9*)
texture;
157 top_volume = mip_volume;
198 return replacements[
i].replacement_format;
209 IDirect3D9 *d3d =
NULL;
256 usage, resource_type, usedformat);
264 TRACE(
"Requested format is not supported, looking for a fallback.\n");
268 FIXME(
"Pixel format %x not handled\n", usedformat);
273 allow_24bits =
fmt->bytes_per_pixel == 3;
279 unsigned int curchannels = !!curfmt->
bits[0] + !!curfmt->
bits[1]
280 + !!curfmt->
bits[2] + !!curfmt->
bits[3];
297 score = 512 * (curfmt->
type ==
fmt->type);
298 score -= 32 * (curchannels -
channels);
300 for (
j = 0;
j < 4;
j++)
303 score -= (diff < 0 ? -diff * 8 : diff) * (
j == 0 ? 1 : 2);
306 if (score > bestscore)
309 usedformat = curfmt->
format;
334 if (
w & (
fmt->block_width - 1))
335 w = (
w +
fmt->block_width) & ~(
fmt->block_width - 1);
336 if (
h & (
fmt->block_height - 1))
337 h = (
h +
fmt->block_height) & ~(
fmt->block_height - 1);
372 UINT max_mipmaps = 1;
380 while (max_dimen > 1)
387 if (*miplevels == 0 || *miplevels > max_mipmaps)
388 *miplevels = max_mipmaps;
401 WARN(
"Couldn't find a suitable pixel format\n");
405 TRACE(
"Format chosen: %x\n", usedformat);
415 TRACE(
"device %p, width %p, height %p, miplevels %p, usage %u, format %p, pool %u.\n",
428 TRACE(
"(%p, %p, %p, %u, %p, %u)\n",
device,
size, miplevels,
usage,
format,
pool);
465 TRACE(
"(%p, %p, %p, %p, %p, %u, %p, %u)\n",
device,
width,
height,
depth, miplevels,
504 UINT max_mipmaps = 1;
507 while (max_dimen > 1)
513 if (*miplevels == 0 || *miplevels > max_mipmaps)
514 *miplevels = max_mipmaps;
533 TRACE(
"device %p, width %u, height %u, miplevels %u, usage %#x, format %#x, pool %#x, texture %p.\n",
552 replacement_formats[] =
563 if (replacement_formats[
i].orig_format ==
format)
564 return replacement_formats[
i].replacement_format;
573 BOOL dynamic_texture, format_specified =
FALSE;
574 unsigned int loaded_miplevels, skip_levels;
575 IDirect3DSurface9 *surface;
576 IDirect3DTexture9 **texptr;
577 IDirect3DTexture9 *buftex;
582 TRACE(
"device %p, srcdata %p, srcdatasize %u, width %u, height %u, miplevels %u," 583 " usage %#x, format %#x, pool %#x, filter %#x, mipfilter %#x, colorkey %#x," 584 " srcinfo %p, palette %p, texture %p.\n",
595 FIXME(
"Unrecognized file format, returning failure.\n");
616 format_specified =
TRUE;
639 if (skip_levels && imginfo.
MipLevels > skip_levels)
641 TRACE(
"Skipping the first %u (of %u) levels of a DDS mipmapped texture.\n",
643 TRACE(
"Texture level 0 dimensions are %ux%u.\n", imginfo.
Width, imginfo.
Height);
644 width >>= skip_levels;
646 miplevels -= skip_levels;
657 FIXME(
"Couldn't find suitable texture parameters.\n");
662 if (colorkey && !format_specified)
668 FIXME(
"Generation of mipmaps for compressed volume textures is not implemented yet.\n");
690 FIXME(
"Texture creation failed.\n");
695 TRACE(
"Texture created correctly. Now loading the texture data into it.\n");
711 FIXME(
"Texture loading failed.\n");
720 FIXME(
"Texture filtering failed.\n");
727 if (texptr == &buftex)
749 const void *srcdata,
UINT srcdatasize,
struct IDirect3DTexture9 **
texture)
766 TRACE(
"device %p, srcfile %s, width %u, height %u, miplevels %u, usage %#x, format %#x, " 767 "pool %#x, filter %#x, mipfilter %#x, colorkey 0x%08x, srcinfo %p, palette %p, texture %p.\n",
777 WARN(
"Failed to open file.\n");
798 TRACE(
"device %p, srcfile %s, width %u, height %u, miplevels %u, usage %#x, format %#x, " 799 "pool %#x, filter %#x, mipfilter %#x, colorkey 0x%08x, srcinfo %p, palette %p, texture %p.\n",
819 const char *srcfile,
struct IDirect3DTexture9 **
texture)
828 const WCHAR *srcfile,
struct IDirect3DTexture9 **
texture)
864 TRACE(
"device %p, srcmodule %p, resource %s, width %u, height %u, miplevels %u, usage %#x, format %#x, " 865 "pool %#x, filter %#x, mipfilter %#x, colorkey 0x%08x, srcinfo %p, palette %p, texture %p.\n",
893 TRACE(
"device %p, srcmodule %p, resource %s, width %u, height %u, miplevels %u, usage %#x, format %#x, " 894 "pool %#x, filter %#x, mipfilter %#x, colorkey 0x%08x, srcinfo %p, palette %p, texture %p.\n",
918 TRACE(
"(%p, %u, %u, %#x, %#x, %#x, %p)\n",
device,
size, miplevels,
usage,
format,
928 TRACE(
"D3DXCheckCubeTextureRequirements failed\n");
949 TRACE(
"(%p, %u, %u, %u, %u, %#x, %#x, %#x, %p)\n",
device,
width,
height,
depth,
960 TRACE(
"D3DXCheckVolumeTextureRequirements failed\n");
970 IDirect3DVolumeTexture9 **volume_texture)
978 TRACE(
"(%p, %s, %p): relay\n",
1001 IDirect3DVolumeTexture9 **volume_texture)
1007 TRACE(
"(%p, %s, %p): relay\n",
1036 IDirect3DVolumeTexture9 **volume_texture)
1044 TRACE(
"(%p, %s, %u, %u, %u, %u, %#x, %#x, %#x, %#x, %#x, %#x, %p, %p, %p): relay\n",
1082 IDirect3DVolumeTexture9 **volume_texture)
1088 TRACE(
"(%p, %s, %u, %u, %u, %u, %#x, %#x, %#x, %#x, %#x, %#x, %p, %p, %p): relay\n",
1109 IDirect3DVolumeTexture9 **volume_texture)
1111 TRACE(
"(%p, %p, %u, %p): relay\n",
device,
data, data_size, volume_texture);
1133 IDirect3DVolumeTexture9 **volume_texture)
1138 BOOL dynamic_texture;
1144 IDirect3DVolumeTexture9 *tex, *buftex;
1146 TRACE(
"(%p, %p, %u, %u, %u, %u, %u, %#x, %#x, %#x, %#x, %#x, %#x, %p, %p, %p)\n",
1147 device,
data, data_size,
width,
height,
depth, mip_levels,
usage,
format,
pool,
1150 if (!
device || !
data || !data_size || !volume_texture)
1203 file_mip_levels =
TRUE;
1210 if ((file_width &&
width != image_info.
Width)
1214 || (file_mip_levels && mip_levels != image_info.
MipLevels))
1223 FIXME(
"Generation of mipmaps for volume textures is not implemented yet.\n");
1263 *volume_texture = tex;
1271 for (
c = 0;
c <
format->bytes_per_pixel;
c++)
1274 for (
c = 0;
c < 4;
c++)
1302 FIXME(
"Unhandled format type %#x\n",
format->type);
1325 IDirect3DSurface9 *surface, *temp_surface;
1336 TRACE(
"texture %p, function %p, funcdata %p.\n",
texture,
function, funcdata);
1343 for (
m = 0;
m < miplevels;
m++)
1351 FIXME(
"Unsupported texture format %#x.\n",
desc.Format);
1368 for (
y = 0;
y <
desc.Height;
y++)
1396 FIXME(
"texture %p, texture_shader %p stub.\n",
texture, texture_shader);
1401 const void *src_data,
1413 IDirect3DCubeTexture9 **cube_texture)
1417 UINT loaded_miplevels;
1419 BOOL dynamic_texture;
1423 IDirect3DCubeTexture9 *tex, *buftex;
1425 TRACE(
"(%p, %p, %u, %u, %u, %#x, %#x, %#x, %#x, %#x, %#x, %p, %p, %p)\n",
device,
1429 if (!
device || !cube_texture || !src_data || !src_data_size)
1464 file_mip_levels =
TRUE;
1474 || (file_mip_levels && mip_levels != img_info.
MipLevels))
1524 *src_info = img_info;
1526 *cube_texture = tex;
1532 const char *src_filename,
1533 IDirect3DCubeTexture9 **cube_texture)
1566 const WCHAR *src_filename,
1567 IDirect3DCubeTexture9 **cube_texture)
1586 const char *src_filename,
1597 IDirect3DCubeTexture9 **cube_texture)
1605 TRACE(
"(%p, %s, %u, %u, %#x, %#x, %#x, %#x, %#x, %#x, %p, %p, %p): relay\n",
1632 const WCHAR *src_filename,
1643 IDirect3DCubeTexture9 **cube_texture)
1649 TRACE(
"(%p, %s, %u, %u, %#x, %#x, %#x, %#x, %#x, %#x, %p, %p, %p): relay\n",
1680 return size -
x - 0.5f;
1684 return size -
y - 0.5f;
1690 ERR(
"Unexpected coordinate value\n");
1705 static const enum cube_coord coordmap[6][3] =
1720 for (
m = 0;
m < miplevels;
m++)
1728 FIXME(
"Unsupported texture format %#x\n",
desc.Format);
1732 for (
f = 0;
f < 6;
f++)
1737 size.x = (
f == 0) || (
f == 1) ? 0.0f : 2.0f /
desc.Width;
1738 size.y = (
f == 2) || (
f == 3) ? 0.0f : 2.0f /
desc.Width;
1739 size.z = (
f == 4) || (
f == 5) ? 0.0f : 2.0f /
desc.Width;
1743 for (
y = 0;
y <
desc.Height;
y++)
1745 for (
x = 0;
x <
desc.Width;
x++)
1765 FIXME(
"texture %p, texture_shader %p stub.\n",
texture, texture_shader);
1785 for (
m = 0;
m < miplevels;
m++)
1793 FIXME(
"Unsupported texture format %#x\n",
desc.Format);
1806 for (
z = 0;
z <
desc.Depth;
z++)
1835 FIXME(
"texture %p, texture_shader %p stub.\n",
texture, texture_shader);
1840 IDirect3DBaseTexture9 *src_texture,
const PALETTEENTRY *src_palette)
1847 TRACE(
"(%s, %#x, %p, %p): relay\n",
1848 wine_dbgstr_a(dst_filename), file_format, src_texture, src_palette);
1869 IDirect3DBaseTexture9 *src_texture,
const PALETTEENTRY *src_palette)
1874 TRACE(
"(%s, %#x, %p, %p): relay\n",
1875 wine_dbgstr_w(dst_filename), file_format, src_texture, src_palette);
1890 IDirect3DBaseTexture9 *src_texture,
const PALETTEENTRY *src_palette)
1894 IDirect3DSurface9 *surface;
1896 TRACE(
"(%p, %#x, %p, %p)\n",
1897 dst_buffer, file_format, src_texture, src_palette);
1912 FIXME(
"Volume textures aren't supported yet\n");
1930 FIXME(
"texture %p, src_texture %p, src_palette %p, flags %#x, channel %u, amplitude %.8e stub.\n",
1931 texture, src_texture, src_palette,
flags, channel, amplitude);
void(WINAPI * LPD3DXFILL2D)(D3DXVECTOR4 *out, const D3DXVECTOR2 *texcoord, const D3DXVECTOR2 *texelsize, void *data)
#define IDirect3DSurface9_Release(p)
HRESULT WINAPI D3DXCheckCubeTextureRequirements(struct IDirect3DDevice9 *device, UINT *size, UINT *miplevels, DWORD usage, D3DFORMAT *format, D3DPOOL pool)
#define IDirect3D9_CheckDeviceFormat(p, a, b, c, d, e, f)
GLint GLint GLsizei width
#define D3DPTEXTURECAPS_POW2
#define IDirect3DDevice9_CreateVolumeTexture(p, a, b, c, d, e, f, g, h, i)
HRESULT WINAPI D3DXCreateCubeTextureFromFileInMemory(struct IDirect3DDevice9 *device, const void *data, UINT datasize, struct IDirect3DCubeTexture9 **texture)
GLubyte GLubyte GLubyte GLubyte w
#define IDirect3DVolumeTexture9_GetLevelDesc(p, a, b)
static unsigned int file_size
#define IDirect3DCubeTexture9_GetLevelDesc(p, a, b)
const char int int int static __inline const char * wine_dbgstr_a(const char *s)
#define IDirect3DDevice9_GetCreationParameters(p, a)
HRESULT WINAPI D3DXLoadSurfaceFromSurface(IDirect3DSurface9 *dst_surface, const PALETTEENTRY *dst_palette, const RECT *dst_rect, IDirect3DSurface9 *src_surface, const PALETTEENTRY *src_palette, const RECT *src_rect, DWORD filter, D3DCOLOR color_key)
HRESULT WINAPI D3DXCreateCubeTextureFromFileExW(IDirect3DDevice9 *device, const WCHAR *src_filename, UINT size, UINT mip_levels, DWORD usage, D3DFORMAT format, D3DPOOL pool, DWORD filter, DWORD mip_filter, D3DCOLOR color_key, D3DXIMAGE_INFO *image_info, PALETTEENTRY *palette, IDirect3DCubeTexture9 **cube_texture)
#define IDirect3DCubeTexture9_GetLevelCount(p)
#define IDirect3DTexture9_GetSurfaceLevel(p, a, b)
char * wine_dbgstr_w(const wchar_t *wstr)
HRESULT WINAPI D3DXCreateTexture(struct IDirect3DDevice9 *device, UINT width, UINT height, UINT miplevels, DWORD usage, D3DFORMAT format, D3DPOOL pool, struct IDirect3DTexture9 **texture)
#define D3DUSAGE_AUTOGENMIPMAP
static float get_cube_coord(enum cube_coord coord, unsigned int x, unsigned int y, unsigned int size)
#define IDirect3DVolumeTexture9_GetLevelCount(p)
#define D3DPTEXTURECAPS_CUBEMAP_POW2
HRSRC WINAPI FindResourceA(HMODULE hModule, LPCSTR name, LPCSTR type)
#define IDirect3DTexture9_Release(p)
HRESULT WINAPI D3DXCreateTextureFromFileInMemoryEx(struct IDirect3DDevice9 *device, const void *srcdata, UINT srcdatasize, UINT width, UINT height, UINT miplevels, DWORD usage, D3DFORMAT format, D3DPOOL pool, DWORD filter, DWORD mipfilter, D3DCOLOR colorkey, D3DXIMAGE_INFO *srcinfo, PALETTEENTRY *palette, struct IDirect3DTexture9 **texture)
#define D3DUSAGE_DONOTCLIP
#define D3DERR_INVALIDCALL
GLint GLint GLint GLint GLint x
#define IDirect3DVolumeTexture9_Release(p)
#define IDirect3DTexture9_GetLevelCount(p)
#define D3DUSAGE_WRITEONLY
#define D3DPTEXTURECAPS_MIPVOLUMEMAP
#define IDirect3DCubeTexture9_Release(p)
enum _D3DXIMAGE_FILEFORMAT D3DXIMAGE_FILEFORMAT
HRESULT WINAPI D3DXCreateTextureFromFileW(struct IDirect3DDevice9 *device, const WCHAR *srcfile, struct IDirect3DTexture9 **texture)
static D3DFORMAT get_alpha_replacement_format(D3DFORMAT format)
HRESULT load_cube_texture_from_dds(IDirect3DCubeTexture9 *cube_texture, const void *src_data, const PALETTEENTRY *palette, DWORD filter, D3DCOLOR color_key, const D3DXIMAGE_INFO *src_info) DECLSPEC_HIDDEN
HRESULT WINAPI D3DXFillVolumeTextureTX(struct IDirect3DVolumeTexture9 *texture, ID3DXTextureShader *texture_shader)
D3DRESOURCETYPE ResourceType
HRSRC WINAPI FindResourceW(HINSTANCE hModule, LPCWSTR name, LPCWSTR type)
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
GLfloat GLfloat GLfloat GLfloat h
#define IDirect3DTexture9_GetLevelDesc(p, a, b)
#define IDirect3DVolumeTexture9_UnlockBox(p, a)
static const WCHAR filenameW[]
#define IDirect3D9_Release(p)
HRESULT WINAPI D3DXCreateTextureFromResourceExA(struct IDirect3DDevice9 *device, HMODULE srcmodule, const char *resource, UINT width, UINT height, UINT miplevels, DWORD usage, D3DFORMAT format, D3DPOOL pool, DWORD filter, DWORD mipfilter, D3DCOLOR colorkey, D3DXIMAGE_INFO *srcinfo, PALETTEENTRY *palette, struct IDirect3DTexture9 **texture)
GLenum const GLfloat * params
#define IDirect3DCubeTexture9_LockRect(p, a, b, c, d, e)
HRESULT WINAPI D3DXSaveTextureToFileW(const WCHAR *dst_filename, D3DXIMAGE_FILEFORMAT file_format, IDirect3DBaseTexture9 *src_texture, const PALETTEENTRY *src_palette)
static const WCHAR desc[]
HRESULT WINAPI D3DXLoadVolumeFromVolume(IDirect3DVolume9 *dst_volume, const PALETTEENTRY *dst_palette, const D3DBOX *dst_box, IDirect3DVolume9 *src_volume, const PALETTEENTRY *src_palette, const D3DBOX *src_box, DWORD filter, D3DCOLOR color_key)
#define IDirect3DDevice9_UpdateTexture(p, a, b)
HRESULT load_resource_into_memory(HMODULE module, HRSRC resinfo, void **buffer, DWORD *length) DECLSPEC_HIDDEN
#define D3DERR_NOTAVAILABLE
#define D3DPTEXTURECAPS_SQUAREONLY
const struct pixel_format_desc * get_format_info_idx(int idx) DECLSPEC_HIDDEN
HRESULT write_buffer_to_file(const WCHAR *filename, ID3DXBuffer *buffer) DECLSPEC_HIDDEN
HRESULT WINAPI D3DXSaveTextureToFileA(const char *dst_filename, D3DXIMAGE_FILEFORMAT file_format, IDirect3DBaseTexture9 *src_texture, const PALETTEENTRY *src_palette)
HRESULT WINAPI D3DXFilterTexture(IDirect3DBaseTexture9 *texture, const PALETTEENTRY *palette, UINT srclevel, DWORD filter)
struct ID3DXBuffer ID3DXBuffer
HRESULT WINAPI D3DXCreateTextureFromFileExW(struct IDirect3DDevice9 *device, const WCHAR *srcfile, UINT width, UINT height, UINT miplevels, DWORD usage, D3DFORMAT format, D3DPOOL pool, DWORD filter, DWORD mipfilter, D3DCOLOR colorkey, D3DXIMAGE_INFO *srcinfo, PALETTEENTRY *palette, struct IDirect3DTexture9 **texture)
enum _D3DFORMAT D3DFORMAT
#define IDirect3DDevice9_GetDisplayMode(p, a, b)
#define D3DUSAGE_NPATCHES
static HRESULT check_texture_requirements(struct IDirect3DDevice9 *device, UINT *width, UINT *height, UINT *miplevels, DWORD usage, D3DFORMAT *format, D3DPOOL pool, D3DRESOURCETYPE resource_type)
#define IDirect3DBaseTexture9_GetType(p)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
#define D3DPTEXTURECAPS_CUBEMAP
#define IDirect3DDevice9_GetDirect3D(p, a)
HRESULT save_dds_texture_to_memory(ID3DXBuffer **dst_buffer, IDirect3DBaseTexture9 *src_texture, const PALETTEENTRY *src_palette) DECLSPEC_HIDDEN
#define D3DX_SKIP_DDS_MIP_LEVELS_SHIFT
D3DXIMAGE_FILEFORMAT ImageFileFormat
HRESULT WINAPI D3DXFillCubeTextureTX(struct IDirect3DCubeTexture9 *texture, ID3DXTextureShader *texture_shader)
HRESULT WINAPI D3DXCreateCubeTextureFromFileExA(IDirect3DDevice9 *device, const char *src_filename, UINT size, UINT mip_levels, DWORD usage, D3DFORMAT format, D3DPOOL pool, DWORD filter, DWORD mip_filter, D3DCOLOR color_key, D3DXIMAGE_INFO *image_info, PALETTEENTRY *palette, IDirect3DCubeTexture9 **cube_texture)
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
HRESULT WINAPI D3DXFillTextureTX(struct IDirect3DTexture9 *texture, ID3DXTextureShader *texture_shader)
WINE_DEFAULT_DEBUG_CHANNEL(d3d8)
HRESULT WINAPI D3DXCreateVolumeTextureFromFileW(IDirect3DDevice9 *device, const WCHAR *filename, IDirect3DVolumeTexture9 **volume_texture)
HRESULT WINAPI D3DXCreateTextureFromResourceW(struct IDirect3DDevice9 *device, HMODULE srcmodule, const WCHAR *resource, struct IDirect3DTexture9 **texture)
HRESULT WINAPI D3DXCreateTextureFromFileInMemory(struct IDirect3DDevice9 *device, const void *srcdata, UINT srcdatasize, struct IDirect3DTexture9 **texture)
#define D3DX_DEFAULT_NONPOW2
HRESULT WINAPI D3DXCreateTextureFromFileExA(struct IDirect3DDevice9 *device, const char *srcfile, UINT width, UINT height, UINT miplevels, DWORD usage, D3DFORMAT format, D3DPOOL pool, DWORD filter, DWORD mipfilter, D3DCOLOR colorkey, D3DXIMAGE_INFO *srcinfo, PALETTEENTRY *palette, struct IDirect3DTexture9 **texture)
HRESULT WINAPI D3DXCreateCubeTextureFromFileW(IDirect3DDevice9 *device, const WCHAR *src_filename, IDirect3DCubeTexture9 **cube_texture)
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
HRESULT map_view_of_file(const WCHAR *filename, void **buffer, DWORD *length) DECLSPEC_HIDDEN
GLint GLint GLsizei GLsizei GLsizei depth
HRESULT WINAPI D3DXSaveSurfaceToFileInMemory(ID3DXBuffer **dst_buffer, D3DXIMAGE_FILEFORMAT file_format, IDirect3DSurface9 *src_surface, const PALETTEENTRY *src_palette, const RECT *src_rect)
#define D3DUSAGE_RTPATCHES
HRESULT WINAPI D3DXCreateCubeTexture(struct IDirect3DDevice9 *device, UINT size, UINT miplevels, DWORD usage, D3DFORMAT format, D3DPOOL pool, struct IDirect3DCubeTexture9 **texture)
HRESULT WINAPI D3DXCreateVolumeTexture(struct IDirect3DDevice9 *device, UINT width, UINT height, UINT depth, UINT miplevels, DWORD usage, D3DFORMAT format, D3DPOOL pool, struct IDirect3DVolumeTexture9 **texture)
#define IDirect3DCubeTexture9_GetCubeMapSurface(p, a, b, c)
#define IDirect3DVolume9_Release(p)
GLsizeiptr const GLvoid GLenum usage
HRESULT load_volume_texture_from_dds(IDirect3DVolumeTexture9 *volume_texture, const void *src_data, const PALETTEENTRY *palette, DWORD filter, DWORD color_key, const D3DXIMAGE_INFO *src_info) DECLSPEC_HIDDEN
GLsizei const GLfloat * value
HRESULT WINAPI D3DXCheckVolumeTextureRequirements(struct IDirect3DDevice9 *device, UINT *width, UINT *height, UINT *depth, UINT *miplevels, DWORD usage, D3DFORMAT *format, D3DPOOL pool)
void(WINAPI * LPD3DXFILL3D)(D3DXVECTOR4 *out, const D3DXVECTOR3 *texcoord, const D3DXVECTOR3 *texelsize, void *data)
static HRESULT get_surface(D3DRESOURCETYPE type, struct IDirect3DBaseTexture9 *tex, int face, UINT level, struct IDirect3DSurface9 **surf)
static uint32_t make_pow2(uint32_t num)
GLint GLint GLsizei GLsizei height
HRESULT WINAPI D3DXCreateVolumeTextureFromFileExW(IDirect3DDevice9 *device, const WCHAR *filename, UINT width, UINT height, UINT depth, UINT mip_levels, DWORD usage, D3DFORMAT format, D3DPOOL pool, DWORD filter, DWORD mip_filter, D3DCOLOR color_key, D3DXIMAGE_INFO *src_info, PALETTEENTRY *palette, IDirect3DVolumeTexture9 **volume_texture)
HRESULT WINAPI D3DXCreateTextureFromResourceA(struct IDirect3DDevice9 *device, HMODULE srcmodule, const char *resource, struct IDirect3DTexture9 **texture)
#define IDirect3DVolumeTexture9_LockBox(p, a, b, c, d)
#define D3DX_FILTER_DITHER
HRESULT unlock_surface(IDirect3DSurface9 *surface, const RECT *surface_rect, IDirect3DSurface9 *temp_surface, BOOL update) DECLSPEC_HIDDEN
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
#define IDirect3DDevice9_CreateTexture(p, a, b, c, d, e, f, g, h)
HRESULT WINAPI D3DXCreateVolumeTextureFromFileA(IDirect3DDevice9 *device, const char *filename, IDirect3DVolumeTexture9 **volume_texture)
#define ID3DXBuffer_Release(p)
#define IDirect3DDevice9_GetDeviceCaps(p, a)
HRESULT WINAPI D3DXFillVolumeTexture(struct IDirect3DVolumeTexture9 *texture, LPD3DXFILL3D function, void *funcdata)
HRESULT WINAPI D3DXCreateVolumeTextureFromFileInMemoryEx(IDirect3DDevice9 *device, const void *data, UINT data_size, UINT width, UINT height, UINT depth, UINT mip_levels, DWORD usage, D3DFORMAT format, D3DPOOL pool, DWORD filter, DWORD mip_filter, D3DCOLOR color_key, D3DXIMAGE_INFO *info, PALETTEENTRY *palette, IDirect3DVolumeTexture9 **volume_texture)
HRESULT WINAPI D3DXCreateVolumeTextureFromFileInMemory(IDirect3DDevice9 *device, const void *data, UINT data_size, IDirect3DVolumeTexture9 **volume_texture)
GLint GLint GLint GLint GLint GLint y
#define MultiByteToWideChar
#define IDirect3DCubeTexture9_UnlockRect(p, a, b)
static void fill_texture(const struct pixel_format_desc *format, BYTE *pos, const D3DXVECTOR4 *value)
HRESULT WINAPI D3DXCheckTextureRequirements(struct IDirect3DDevice9 *device, UINT *width, UINT *height, UINT *miplevels, DWORD usage, D3DFORMAT *format, D3DPOOL pool)
#define D3DPTEXTURECAPS_MIPCUBEMAP
#define IDirect3DVolumeTexture9_GetVolumeLevel(p, a, b)
HRESULT WINAPI D3DXCreateTextureFromFileA(struct IDirect3DDevice9 *device, const char *srcfile, struct IDirect3DTexture9 **texture)
HRESULT lock_surface(IDirect3DSurface9 *surface, const RECT *surface_rect, D3DLOCKED_RECT *lock, IDirect3DSurface9 **temp_surface, BOOL write) DECLSPEC_HIDDEN
HRESULT WINAPI D3DXGetImageInfoFromFileInMemory(const void *data, UINT datasize, D3DXIMAGE_INFO *info)
char * cleanup(char *str)
#define D3DPTEXTURECAPS_VOLUMEMAP_POW2
static D3DFORMAT get_replacement_format(D3DFORMAT format)
const struct pixel_format_desc * get_format_info(D3DFORMAT format) DECLSPEC_HIDDEN
HRESULT WINAPI D3DXFillCubeTexture(struct IDirect3DCubeTexture9 *texture, LPD3DXFILL3D function, void *funcdata)
GLuint GLuint GLsizei GLenum type
HRESULT WINAPI D3DXCreateCubeTextureFromFileInMemoryEx(IDirect3DDevice9 *device, const void *src_data, UINT src_data_size, UINT size, UINT mip_levels, DWORD usage, D3DFORMAT format, D3DPOOL pool, DWORD filter, DWORD mip_filter, D3DCOLOR color_key, D3DXIMAGE_INFO *src_info, PALETTEENTRY *palette, IDirect3DCubeTexture9 **cube_texture)
HRESULT WINAPI D3DXCreateVolumeTextureFromFileExA(IDirect3DDevice9 *device, const char *filename, UINT width, UINT height, UINT depth, UINT mip_levels, DWORD usage, D3DFORMAT format, D3DPOOL pool, DWORD filter, DWORD mip_filter, D3DCOLOR color_key, D3DXIMAGE_INFO *src_info, PALETTEENTRY *palette, IDirect3DVolumeTexture9 **volume_texture)
static BOOL is_pow2(UINT num)
#define IDirect3DBaseTexture9_GetLevelCount(p)
#define D3DPTEXTURECAPS_VOLUMEMAP
unsigned short float_32_to_16(const float in) DECLSPEC_HIDDEN
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
HRESULT WINAPI D3DXCreateCubeTextureFromFileA(IDirect3DDevice9 *device, const char *src_filename, IDirect3DCubeTexture9 **cube_texture)
#define IDirect3DDevice9_CreateCubeTexture(p, a, b, c, d, e, f, g)
#define HeapFree(x, y, z)
enum _D3DRESOURCETYPE D3DRESOURCETYPE
GLenum GLuint GLint GLenum face
HRESULT WINAPI D3DXCreateTextureFromResourceExW(struct IDirect3DDevice9 *device, HMODULE srcmodule, const WCHAR *resource, UINT width, UINT height, UINT miplevels, DWORD usage, D3DFORMAT format, D3DPOOL pool, DWORD filter, DWORD mipfilter, D3DCOLOR colorkey, D3DXIMAGE_INFO *srcinfo, PALETTEENTRY *palette, struct IDirect3DTexture9 **texture)
HRESULT WINAPI D3DXLoadSurfaceFromFileInMemory(IDirect3DSurface9 *pDestSurface, const PALETTEENTRY *pDestPalette, const RECT *pDestRect, const void *pSrcData, UINT SrcDataSize, const RECT *pSrcRect, DWORD dwFilter, D3DCOLOR Colorkey, D3DXIMAGE_INFO *pSrcInfo)
HRESULT load_texture_from_dds(IDirect3DTexture9 *texture, const void *src_data, const PALETTEENTRY *palette, DWORD filter, D3DCOLOR color_key, const D3DXIMAGE_INFO *src_info, unsigned int skip_levels, unsigned int *loaded_miplevels) DECLSPEC_HIDDEN
#define D3DCAPS2_DYNAMICTEXTURES
HRESULT WINAPI D3DXComputeNormalMap(IDirect3DTexture9 *texture, IDirect3DTexture9 *src_texture, const PALETTEENTRY *src_palette, DWORD flags, DWORD channel, float amplitude)
HRESULT WINAPI D3DXFillTexture(struct IDirect3DTexture9 *texture, LPD3DXFILL2D function, void *funcdata)
static int comp_value(const WCHAR *ptr, int dpc)
HRESULT WINAPI D3DXSaveTextureToFileInMemory(ID3DXBuffer **dst_buffer, D3DXIMAGE_FILEFORMAT file_format, IDirect3DBaseTexture9 *src_texture, const PALETTEENTRY *src_palette)