source: branch/egtra-gdiplus/directx9/d3dx9tex.sbp@ 302

Last change on this file since 302 was 1, checked in by (none), 18 years ago
File size: 16.2 KB
Line 
1'd3dx9tex.sbp
2
3
4#ifndef _INC_D3DX9TEX
5#define _INC_D3DX9TEX
6
7
8' D3DX_FILTER flags
9Const D3DX_FILTER_NONE = 1
10Const D3DX_FILTER_POINT = 2
11Const D3DX_FILTER_LINEAR = 3
12Const D3DX_FILTER_TRIANGLE = 4
13Const D3DX_FILTER_BOX = 5
14
15Const D3DX_FILTER_MIRROR_U = 1 << 16
16Const D3DX_FILTER_MIRROR_V = 2 << 16
17Const D3DX_FILTER_MIRROR_W = 4 << 16
18Const D3DX_FILTER_MIRROR = 7 << 16
19
20Const D3DX_FILTER_DITHER = 1 << 19
21Const D3DX_FILTER_DITHER_DIFFUSION = 2 << 19
22
23Const D3DX_FILTER_SRGB_IN = 1 << 21
24Const D3DX_FILTER_SRGB_OUT = 2 << 21
25Const D3DX_FILTER_SRGB = 3 << 21
26
27
28' D3DX_NORMALMAP flags
29Const D3DX_NORMALMAP_MIRROR_U = 1 << 16
30Const D3DX_NORMALMAP_MIRROR_V = 2 << 16
31Const D3DX_NORMALMAP_MIRROR = 3 << 16
32Const D3DX_NORMALMAP_INVERTSIGN = 8 << 16
33Const D3DX_NORMALMAP_COMPUTE_OCCLUSION =16 << 16
34
35
36' D3DX_CHANNEL flags
37Const D3DX_CHANNEL_RED = 1 << 0
38Const D3DX_CHANNEL_BLUE = 1 << 1
39Const D3DX_CHANNEL_GREEN = 1 << 2
40Const D3DX_CHANNEL_ALPHA = 1 << 3
41Const D3DX_CHANNEL_LUMINANCE = 1 << 4
42
43
44Const Enum D3DXIMAGE_FILEFORMAT
45 D3DXIFF_BMP = 0
46 D3DXIFF_JPG = 1
47 D3DXIFF_TGA = 2
48 D3DXIFF_PNG = 3
49 D3DXIFF_DDS = 4
50 D3DXIFF_PPM = 5
51 D3DXIFF_DIB = 6
52 D3DXIFF_HDR = 7
53 D3DXIFF_PFM = 8
54 D3DXIFF_FORCE_DWORD = &H7FFFFFFF
55End Enum
56
57
58Type D3DXIMAGE_INFO
59 Width As DWord
60 Height As DWord
61 Depth As DWord
62 MipLevels As DWord
63 Format As D3DFORMAT
64 ResourceType As D3DRESOURCETYPE
65 ImageFileFormat As D3DXIMAGE_FILEFORMAT
66End Type
67
68
69'-----------------
70' Image File APIs
71'-----------------
72
73Declare Function D3DXGetImageInfoFromFile Lib "dx9abm" Alias "D3DXGetImageInfoFromFile_abm" (pSrcFile As BytePtr, pSrcInfo As *D3DXIMAGE_INFO) As DWord
74Declare Function D3DXGetImageInfoFromResource Lib "dx9abm" Alias "D3DXGetImageInfoFromResource_abm" (hSrcModule As DWord, pSrcResource As BytePtr, pSrcInfo As *D3DXIMAGE_INFO) As DWord
75Declare Function D3DXGetImageInfoFromFileInMemory Lib "dx9abm" Alias "D3DXGetImageInfoFromFileInMemory_abm" (pSrcData As VoidPtr, SrcDataSize As DWord, pSrcInfo As *D3DXIMAGE_INFO) As DWord
76
77
78'------------------------
79' Load/Save Surface APIs
80'------------------------
81
82Declare Function D3DXLoadSurfaceFromFile Lib "dx9abm" Alias "D3DXLoadSurfaceFromFile_abm" (pDestSurface As *IDirect3DSurface9, pDestPalette As *PALETTEENTRY, pDestRect As *RECT, pSrcFile As BytePtr, pSrcRect As *RECT, Filter As DWord, ColorKey As DWord, pSrcInfo As *D3DXIMAGE_INFO) As DWord
83Declare Function D3DXLoadSurfaceFromResource Lib "dx9abm" Alias "D3DXLoadSurfaceFromResource_abm" (pDestSurface As *IDirect3DSurface9, pDestPalette As *PALETTEENTRY, pDestRect As *RECT, hSrcModule As DWord, hSrcResource As BytePtr, pSrcRect As *RECT, Filter As DWord, ColorKey As DWord, pSrcInfo As *D3DXIMAGE_INFO) As DWord
84Declare Function D3DXLoadSurfaceFromFileInMemory Lib "dx9abm" Alias "D3DXLoadSurfaceFromFileInMemory_abm" (pDestSurface As *IDirect3DSurface9, pDestPalette As *PALETTEENTRY, pDestRect As *RECT, pSrcData As VoidPtr, SrcDataSize As DWord, pSrcRect As *RECT, Filter As DWord, ColorKey As DWord, pSrcInfo As *D3DXIMAGE_INFO) As DWord
85Declare Function D3DXLoadSurfaceFromSurface Lib "dx9abm" Alias "D3DXLoadSurfaceFromSurface_abm" (pDestSurface As *IDirect3DSurface9, pDestPalette As *PALETTEENTRY, pDestRect As *RECT, pSrcSurface As *IDirect3DSurface9, pSrcPalette As *PALETTEENTRY, pSrcRect As *RECT, Filter As DWord, ColorKey As DWord) As DWord
86Declare Function D3DXLoadSurfaceFromMemory Lib "dx9abm" Alias "D3DXLoadSurfaceFromMemory_abm" (pDestSurface As *IDirect3DSurface9, pDestPalette As *PALETTEENTRY, pDestRect As *RECT, pSrcMemory As VoidPtr, SrcFormat As D3DFORMAT, SrcPitch As DWord, pSrcPalette As *PALETTEENTRY, pSrcRect As *RECT, Filter As DWord, ColorKey As DWord) As DWord
87Declare Function D3DXSaveSurfaceToFile Lib "dx9abm" Alias "D3DXSaveSurfaceToFile_abm" (pDestFile As BytePtr, DestFormat As D3DXIMAGE_FILEFORMAT, pSrcSurface As *IDirect3DSurface9, pSrcPalette As *PALETTEENTRY, pSrcRect As *RECT) As DWord
88Declare Function D3DXSaveSurfaceToFileInMemory Lib "dx9abm" Alias "D3DXSaveSurfaceToFileInMemory_abm" (ppDestBuf As *ID3DXBuffer, DestFormat As D3DXIMAGE_FILEFORMAT, pSrcSurface As *IDirect3DSurface9, pSrcPalette As *PALETTEENTRY, pSrcRect As *RECT) As DWord
89
90
91'-----------------------
92' Load/Save Volume APIs
93'-----------------------
94Declare Function D3DXLoadVolumeFromFile Lib "dx9abm" Alias "D3DXLoadVolumeFromFile_abm" (pDestVolume As *IDirect3DVolume9, pDestPalette As *PALETTEENTRY, pDestBox As *D3DBOX, pSrcFile As BytePtr, pSrcBox As *D3DBOX, Filter As DWord, ColorKey As DWord, pSrcInfo As *D3DXIMAGE_INFO) As DWord
95Declare Function D3DXLoadVolumeFromResource Lib "dx9abm" Alias "D3DXLoadVolumeFromResource_abm" (pDestVolume As *IDirect3DVolume9, pDestPalette As *PALETTEENTRY, pDestBox As *D3DBOX, hSrcModule As DWord, pSrcResource As BytePtr, pSrcBox As *D3DBOX, Filter As DWord, ColorKey As DWord, pSrcInfo As *D3DXIMAGE_INFO) As DWord
96Declare Function D3DXLoadVolumeFromFileInMemory Lib "dx9abm" Alias "D3DXLoadVolumeFromFileInMemory_abm" (pDestVolume As *IDirect3DVolume9, pDestPalette As *PALETTEENTRY, pDestBox As *D3DBOX, pSrcData As VoidPtr, SrcDataSize As DWord, pSrcBox As *D3DBOX, Filter As DWord, ColorKey As DWord, pSrcInfo As *D3DXIMAGE_INFO) As DWord
97Declare Function D3DXLoadVolumeFromVolume Lib "dx9abm" Alias "D3DXLoadVolumeFromVolume_abm" (pDestVolume As *IDirect3DVolume9, pDestPalette As *PALETTEENTRY, pDestBox As *D3DBOX, pSrcVolume As *IDirect3DVolume9, pSrcPalette As *PALETTEENTRY, pSrcBox As *D3DBOX, Filter As DWord, ColorKey As DWord) As DWord
98Declare Function D3DXLoadVolumeFromMemory Lib "dx9abm" Alias "D3DXLoadVolumeFromMemory_abm" (pDestVolume As *IDirect3DVolume9, pDestPalette As *PALETTEENTRY, pDestBox As *D3DBOX, pSrcMemory As VoidPtr, SrcFormat As D3DFORMAT, SrcRowPitch As DWord, SrcSlicePitch As DWord, pSrcPalette As *PALETTEENTRY, pSrcBox As *D3DBOX, Filter As DWord, ColorKey As DWord) As DWord
99Declare Function D3DXSaveVolumeToFile Lib "dx9abm" Alias "D3DXSaveVolumeToFile_abm" (pDestFile As BytePtr, DestFormat As D3DXIMAGE_FILEFORMAT, pSrcVolume As *IDirect3DVolume9, pSrcPalette As *PALETTEENTRY, pSrcBox As *D3DBOX) As DWord
100Declare Function D3DXSaveVolumeToFileInMemory Lib "dx9abm" Alias "D3DXSaveVolumeToFileInMemory_abm" (ppDestBuf As **ID3DXBuffer, DestFormat As D3DXIMAGE_FILEFORMAT, pSrcVolume As *IDirect3DVolume9, pSrcPalette As *PALETTEENTRY, pSrcBox As *D3DBOX) As DWord
101
102
103'--------------------------
104' Create/Save Texture APIs
105'--------------------------
106Declare Function D3DXCheckTextureRequirements Lib "dx9abm" Alias "D3DXCheckTextureRequirements_abm" (pDevice As LPDIRECT3DDEVICE9, pWidth As DWordPtr, pHeight As DWordPtr, pNumMipLevels As DWordPtr, Usage As DWord, pFormat As *D3DFORMAT, Pool As D3DPOOL) As DWord
107Declare Function D3DXCheckCubeTextureRequirements Lib "dx9abm" Alias "D3DXCheckCubeTextureRequirements_abm" (pDevice As LPDIRECT3DDEVICE9, pSize As DWordPtr, pNumMipLevels As DWordPtr, Usage As DWord, pFormat As *D3DFORMAT, Pool As D3DPOOL) As DWord
108Declare Function D3DXCheckVolumeTextureRequirements Lib "dx9abm" Alias "D3DXCheckVolumeTextureRequirements_abm" (pDevice As LPDIRECT3DDEVICE9, pWidth As DWordPtr, pHeight As DWordPtr, pDepth As DWordPtr, pNumMipLevels As DWordPtr, Usage As DWord, pFormat As *D3DFORMAT, Pool As D3DPOOL) As DWord
109Declare Function D3DXCreateTexture Lib "dx9abm" Alias "D3DXCreateTexture_abm" (pDevice As LPDIRECT3DDEVICE9, Width As DWord, Height As DWord, MipLevels As DWord, Usage As DWord, Format As D3DFORMAT, Pool As D3DPOOL, ppTexture As *LPDIRECT3DTEXTURE9) As DWord
110Declare Function D3DXCreateCubeTexture Lib "dx9abm" Alias "D3DXCreateCubeTexture_abm" (pDevice As LPDIRECT3DDEVICE9, Size As DWord, MipLevels As DWord, Usage As DWord, Format As D3DFORMAT, Pool As D3DPOOL, ppCubeTexture As *LPDIRECT3DCUBETEXTURE9) As DWord
111Declare Function D3DXCreateVolumeTexture Lib "dx9abm" Alias "D3DXCreateVolumeTexture_abm" (pDevice As LPDIRECT3DDEVICE9, Width As DWord, Height As DWord, Depth As DWord, MipLevels As DWord, Usage As DWord, Format As D3DFORMAT, Pool As D3DPOOL, ppVolumeTexture As *LPDIRECT3DVOLUMETEXTURE9) As DWord
112Declare Function D3DXCreateTextureFromFile Lib "dx9abm" Alias "D3DXCreateTextureFromFile_abm" (pDevice As LPDIRECT3DDEVICE9, pSrcFile As BytePtr, ppTexture As *LPDIRECT3DTEXTURE9) As DWord
113Declare Function D3DXCreateCubeTextureFromFile Lib "dx9abm" Alias "D3DXCreateCubeTextureFromFile_abm" (pDevice As LPDIRECT3DDEVICE9, pSrcFile As BytePtr, ppCubeTexture As *LPDIRECT3DCUBETEXTURE9) As DWord
114Declare Function D3DXCreateVolumeTextureFromFile Lib "dx9abm" Alias "D3DXCreateVolumeTextureFromFile_abm" (pDevice As LPDIRECT3DDEVICE9, pSrcFile As BytePtr, ppVolumeTexture As *LPDIRECT3DVOLUMETEXTURE9) As DWord
115Declare Function D3DXCreateTextureFromResource Lib "dx9abm" Alias "D3DXCreateTextureFromResource_abm" (pDevice As LPDIRECT3DDEVICE9, hSrcModule As HINSTANCE, pSrcResource As BytePtr, ppTexture As *LPDIRECT3DTEXTURE9) As DWord
116Declare Function D3DXCreateCubeTextureFromResource Lib "dx9abm" Alias "D3DXCreateCubeTextureFromResource_abm" (pDevice As LPDIRECT3DDEVICE9, hSrcModule As HINSTANCE, pSrcResource As BytePtr, ppCubeTexture As *LPDIRECT3DCUBETEXTURE9) As DWord
117Declare Function D3DXCreateVolumeTextureFromResource Lib "dx9abm" Alias "D3DXCreateVolumeTextureFromResource_abm" (pDevice As LPDIRECT3DDEVICE9, hSrcModule As HINSTANCE, pSrcResource As BytePtr, ppVolumeTexture As *LPDIRECT3DVOLUMETEXTURE9) As DWord
118Declare Function D3DXCreateTextureFromFileEx Lib "dx9abm" Alias "D3DXCreateTextureFromFileEx_abm" (pDevice As LPDIRECT3DDEVICE9, pSrcFile As BytePtr, Width As DWord, Height As DWord, MipLevels As DWord, Usage As DWord, Format As D3DFORMAT, Pool As D3DPOOL, Filter As DWord, MipFilter As DWord, ColorKey As D3DCOLOR, pSrcInfo As *D3DXIMAGE_INFO, pPalette As *PALETTEENTRY, ppTexture As *LPDIRECT3DTEXTURE9) As DWord
119Declare Function D3DXCreateCubeTextureFromFileEx Lib "dx9abm" Alias "D3DXCreateCubeTextureFromFileEx_abm" (pDevice As LPDIRECT3DDEVICE9, pSrcFile As BytePtr, Size As DWord, MipLevels As DWord, Usage As DWord, Format As D3DFORMAT, Pool As D3DPOOL, Filter As DWord, MipFilter As DWord, ColorKey As D3DCOLOR, pSrcInfo As *D3DXIMAGE_INFO, pPalette As *PALETTEENTRY, ppCubeTexture As *LPDIRECT3DCUBETEXTURE9) As DWord
120Declare Function D3DXCreateVolumeTextureFromFileEx Lib "dx9abm" Alias "D3DXCreateVolumeTextureFromFileEx_abm" (pDevice As LPDIRECT3DDEVICE9, pSrcFile As BytePtr, Width As DWord, Height As Dword, Depth As DWord, MipLevels As DWord, Usage As DWord, Format As D3DFORMAT, Pool As D3DPOOL, Filter As DWord, MipFilter As DWord, ColorKey As D3DCOLOR, pSrcInfo As *D3DXIMAGE_INFO, pPalette As *PALETTEENTRY, ppVolumeTexture As *LPDIRECT3DVOLUMETEXTURE9) As DWord
121Declare Function D3DXCreateTextureFromResourceEx Lib "dx9abm" Alias "D3DXCreateTextureFromResourceEx_abm" (pDevice As LPDIRECT3DDEVICE9, hSrcModule As HINSTANCE, pSrcResource As BytePtr, Width As DWord, Height As DWord, MipLevels As DWord, Usage As DWord, Format As D3DFORMAT, Pool As D3DPOOL, Filter As DWord, MipFilter As DWord, ColorKey As D3DCOLOR, pSrcInfo As *D3DXIMAGE_INFO, pPalette As *PALETTEENTRY, ppTexture As *LPDIRECT3DTEXTURE9) As DWord
122Declare Function D3DXCreateCubeTextureFromResourceEx Lib "dx9abm" Alias "D3DXCreateCubeTextureFromResourceEx_abm" (pDevice As LPDIRECT3DDEVICE9, hSrcModule As HINSTANCE, pSrcResource As BytePtr, Size As DWord, MipLevels As DWord, Usage As DWord, Format As D3DFORMAT, Pool As D3DPOOL, Filter As DWord, MipFilter As DWord, ColorKey As D3DCOLOR, pSrcInfo As *D3DXIMAGE_INFO, pPalette As *PALETTEENTRY, ppCubeTexture As *LPDIRECT3DCUBETEXTURE9) As DWord
123Declare Function D3DXCreateVolumeTextureFromResourceEx Lib "dx9abm" Alias "D3DXCreateVolumeTextureFromResourceEx_abm" (pDevice As LPDIRECT3DDEVICE9, hSrcModule As HINSTANCE, pSrcResource As BytePtr, Width As DWord, Height As Dword, Depth As DWord, MipLevels As DWord, Usage As DWord, Format As D3DFORMAT, Pool As D3DPOOL, Filter As DWord, MipFilter As DWord, ColorKey As D3DCOLOR, pSrcInfo As *D3DXIMAGE_INFO, pPalette As *PALETTEENTRY, ppVolumeTexture As *LPDIRECT3DVOLUMETEXTURE9) As DWord
124Declare Function D3DXCreateTextureFromFileInMemory Lib "dx9abm" Alias "D3DXCreateTextureFromFileInMemory_abm" (pDevice As LPDIRECT3DDEVICE9, pSrcData As VoidPtr, SrcDataSize As DWord, ppTexture As *LPDIRECT3DTEXTURE9) As DWord
125Declare Function D3DXCreateCubeTextureFromFileInMemory Lib "dx9abm" Alias "D3DXCreateCubeTextureFromFileInMemory_abm" (pDevice As LPDIRECT3DDEVICE9, pSrcData As VoidPtr, SrcDataSize As DWord, ppCubeTexture As *LPDIRECT3DCUBETEXTURE9) As DWord
126Declare Function D3DXCreateVolumeTextureFromFileInMemory Lib "dx9abm" Alias "D3DXCreateVolumeTextureFromFileInMemory_abm" (pDevice As LPDIRECT3DDEVICE9, pSrcData As VoidPtr, SrcDataSize As DWord, ppVolumeTexture As *LPDIRECT3DVOLUMETEXTURE9) As DWord
127Declare Function D3DXCreateTextureFromFileInMemoryEx Lib "dx9abm" Alias "D3DXCreateTextureFromFileInMemoryEx_abm" (pDevice As LPDIRECT3DDEVICE9, pSrcData As VoidPtr, SrcDataSize As DWord, Width As DWord, Height As DWord, MipLevels As DWord, Usage As DWord, Format As D3DFORMAT, Pool As D3DPOOL, Filter As DWord, MipFilter As DWord, ColorKey As D3DCOLOR, pSrcInfo As *D3DXIMAGE_INFO, pPalette As *PALETTEENTRY, ppTexture As *LPDIRECT3DTEXTURE9) As DWord
128Declare Function D3DXCreateCubeTextureFromFileInMemoryEx Lib "dx9abm" Alias "D3DXCreateCubeTextureFromFileInMemoryEx_abm" (pDevice As LPDIRECT3DDEVICE9, pSrcData As VoidPtr, SrcDataSize As DWord,Size As DWord, MipLevels As DWord, Usage As DWord, Format As D3DFORMAT, Pool As D3DPOOL, Filter As DWord, MipFilter As DWord, ColorKey As D3DCOLOR, pSrcInfo As *D3DXIMAGE_INFO, pPalette As *PALETTEENTRY, ppCubeTexture As *LPDIRECT3DCUBETEXTURE9) As DWord
129Declare Function D3DXCreateVolumeTextureFromFileInMemoryEx Lib "dx9abm" Alias "D3DXCreateVolumeTextureFromFileInMemoryEx_abm" (pDevice As LPDIRECT3DDEVICE9, pSrcData As VoidPtr, SrcDataSize As DWord, Width As DWord, Height As DWord, Depth As DWord, MipLevels As DWord, Usage As DWord, Format As D3DFORMAT, Pool As D3DPOOL, Filter As DWord, MipFilter As DWord, ColorKey As D3DCOLOR, pSrcInfo As *D3DXIMAGE_INFO, pPalette As *PALETTEENTRY, ppVolumeTexture As *LPDIRECT3DVOLUMETEXTURE9) As DWord
130Declare Function D3DXSaveTextureToFile Lib "dx9abm" Alias "D3DXSaveTextureToFile_abm" (pDestFile As BytePtr, DestFormat As D3DXIMAGE_FILEFORMAT, pSrcTexture As LPDIRECT3DBASETEXTURE9, pSrcPalette As *PALETTEENTRY) As DWord
131Declare Function D3DXSaveTextureToFileInMemory Lib "dx9abm" Alias "D3DXSaveTextureToFileInMemory_abm" (ppDestBuf As *LPD3DXBUFFER, DestFormat As D3DXIMAGE_FILEFORMAT, pSrcTexture As LPDIRECT3DBASETEXTURE9, pSrcPalette As *PALETTEENTRY) As DWord
132
133
134'-------------------
135' Misc Texture APIs
136'-------------------
137Declare Function D3DXFilterTexture Lib "dx9abm" Alias "D3DXFilterTexture_abm" (pBaseTexture As LPDIRECT3DBASETEXTURE9, pPalette As *PALETTEENTRY, SrcLevel As DWord, Filter As DWord) As DWord
138Declare Function D3DXFillTexture Lib "dx9abm" Alias "D3DXFillTexture_abm" (pTexture As LPDIRECT3DTEXTURE9, pFunction As VoidPtr, pData As VoidPtr) As DWord
139Declare Function D3DXFillCubeTexture Lib "dx9abm" Alias "D3DXFillCubeTexture_abm" (pCubeTexture As LPDIRECT3DCUBETEXTURE9, pFunction As VoidPtr, pData As VoidPtr) As DWord
140Declare Function D3DXFillVolumeTexture Lib "dx9abm" Alias "D3DXFillVolumeTexture_abm" (pVolumeTexture As LPDIRECT3DVOLUMETEXTURE9, pFunction As VoidPtr, pData As VoidPtr) As DWord
141Declare Function D3DXFillTextureTX Lib "dx9abm" Alias "D3DXFillTextureTX_abm" (pTexture As LPDIRECT3DTEXTURE9, pTextureShader As LPD3DXTEXTURESHADER) As DWord
142Declare Function D3DXFillCubeTextureTX Lib "dx9abm" Alias "D3DXFillCubeTextureTX_abm" (pCubeTexture As LPDIRECT3DCUBETEXTURE9, pTextureShader As LPD3DXTEXTURESHADER) As DWord
143Declare Function D3DXFillVolumeTextureTX Lib "dx9abm" Alias "D3DXFillVolumeTextureTX_abm" (pVolumeTexture As LPDIRECT3DVOLUMETEXTURE9, pTextureShader As LPD3DXTEXTURESHADER) As DWord
144Declare Function D3DXComputeNormalMap Lib "dx9abm" Alias "D3DXComputeNormalMap_abm" (pTexture As LPDIRECT3DTEXTURE9, pSrcTexture As LPDIRECT3DTEXTURE9, pSrcPalette As *PALETTEENTRY, Flags As DWord, Channel As DWord, Amplitude As Single) As DWord
145
146
147#endif '_INC_D3DX9TEX
148
Note: See TracBrowser for help on using the repository browser.