Ada计算机图形DirectX之D3DX10tex

xiaoxiao2025-06-10  12

---------------------------------------- -- File : D3DX10tex.ads -- -- Translator:Dongfeng.Gu,2018/10/25 -- -- Mail: 515639@qq.com -- -- Progress:100% -- ---------------------------------------- with win32; use win32; with Win32.Windef; use win32.windef; with win32.Objbase; use win32.Objbase; with win32.Winerror; with d3d10; use d3d10; with d3d10misc; use d3d10misc; with d3dx10core; use d3dx10core; with DXGIFormat; use DXGIFormat; package d3dx10tex is function Shift_Left(A:dword;B:Natural) return dword with import,convention=>Intrinsic; function Lsh(A:dword;B:Natural) return dword is (Shift_Left(A,B)); function Shift_Right(A:dword;B:Natural) return dword with import,convention=>Intrinsic; function Rsh(A:dword;B:Natural) return dword is (Shift_Right(A,B)); type D3DX10_FILTER_FLAG is (D3DX10_FILTER_NONE, D3DX10_FILTER_POINT, D3DX10_FILTER_LINEAR, D3DX10_FILTER_TRIANGLE, D3DX10_FILTER_BOX, D3DX10_FILTER_MIRROR_U, D3DX10_FILTER_MIRROR_V, D3DX10_FILTER_MIRROR_W, D3DX10_FILTER_MIRROR, D3DX10_FILTER_DITHER, D3DX10_FILTER_DITHER_DIFFUSION, D3DX10_FILTER_SRGB_IN, D3DX10_FILTER_SRGB_OUT, D3DX10_FILTER_SRGB); for D3DX10_FILTER_FLAG use (D3DX10_FILTER_NONE=>1, D3DX10_FILTER_POINT=>2, D3DX10_FILTER_LINEAR=>3, D3DX10_FILTER_TRIANGLE=>4, D3DX10_FILTER_BOX=>5, D3DX10_FILTER_MIRROR_U=>16#10000#, D3DX10_FILTER_MIRROR_V=>16#20000#, D3DX10_FILTER_MIRROR_W=>16#40000#, D3DX10_FILTER_MIRROR=>16#70000#, D3DX10_FILTER_DITHER=>16#80000#, D3DX10_FILTER_DITHER_DIFFUSION=>16#100000#, D3DX10_FILTER_SRGB_IN=> 16#200000#, D3DX10_FILTER_SRGB_OUT=> 16#400000#, D3DX10_FILTER_SRGB=> 16#600000#); type LPD3DX10_FILTER_FLAG is access D3DX10_FILTER_FLAG; type D3DX10_NORMALMAP_FLAG is (D3DX10_NORMALMAP_MIRROR_U, D3DX10_NORMALMAP_MIRROR_V, D3DX10_NORMALMAP_MIRROR, D3DX10_NORMALMAP_INVERTSIGN, D3DX10_NORMALMAP_COMPUTE_OCCLUSION); for D3DX10_NORMALMAP_FLAG use (D3DX10_NORMALMAP_MIRROR_U=>16#10000#, D3DX10_NORMALMAP_MIRROR_V=>16#20000#, D3DX10_NORMALMAP_MIRROR=>16#30000#, D3DX10_NORMALMAP_INVERTSIGN=>16#80000#, D3DX10_NORMALMAP_COMPUTE_OCCLUSION=>16#100000#); type LPD3DX10_NORMALMAP_FLAG is access D3DX10_NORMALMAP_FLAG; type D3DX10_CHANNEL_FLAG is (D3DX10_CHANNEL_RED, D3DX10_CHANNEL_BLUE, D3DX10_CHANNEL_GREEN, D3DX10_CHANNEL_ALPHA, D3DX10_CHANNEL_LUMINANCE); for D3DX10_CHANNEL_FLAG use (D3DX10_CHANNEL_RED=>1, D3DX10_CHANNEL_BLUE=>2, D3DX10_CHANNEL_GREEN=>4, D3DX10_CHANNEL_ALPHA=>8, D3DX10_CHANNEL_LUMINANCE=>16); type LPD3DX10_CHANNEL_FLAG is access D3DX10_CHANNEL_FLAG; type D3DX10_IMAGE_FILE_FORMAT is (D3DX10_IFF_BMP, D3DX10_IFF_JPG, D3DX10_IFF_PNG, D3DX10_IFF_DDS, D3DX10_IFF_TIFF, D3DX10_IFF_GIF, D3DX10_IFF_WMP, D3DX10_IFF_FORCE_DWORD); for D3DX10_IMAGE_FILE_FORMAT use (D3DX10_IFF_BMP=>0, D3DX10_IFF_JPG=>1, D3DX10_IFF_PNG=>3, D3DX10_IFF_DDS=>4, D3DX10_IFF_TIFF=>10, D3DX10_IFF_GIF=>11, D3DX10_IFF_WMP=>12, D3DX10_IFF_FORCE_DWORD=>16#7fffffff#); type LPD3DX10_IMAGE_FILE_FORMAT is access D3DX10_IMAGE_FILE_FORMAT; type D3DX10_SAVE_TEXTURE_FLAG is (D3DX10_STF_USEINPUTBLOB); for D3DX10_SAVE_TEXTURE_FLAG use (D3DX10_STF_USEINPUTBLOB=>16#0001#); type LPD3DX10_SAVE_TEXTURE_FLAG is access D3DX10_SAVE_TEXTURE_FLAG; type D3DX10_IMAGE_INFO is record Width: UINT; Height: UINT; Depth: UINT; ArraySize: UINT; MipLevels: UINT; MiscFlags: UINT; Format: DXGI_FORMAT; ResourceDimension: D3D10_RESOURCE_DIMENSION; ImageFileFormat: D3DX10_IMAGE_FILE_FORMAT; end record; type LPD3DX10_IMAGE_INFO is access all D3DX10_IMAGE_INFO; type D3DX10_IMAGE_LOAD_INFO is record Width: UINT; Height: UINT; Depth: UINT; FirstMipLevel: UINT; MipLevels: UINT; Usage: D3D10_USAGE; BindFlags: UINT; CpuAccessFlags: UINT; MiscFlags: UINT; Format: DXGI_FORMAT; Filter: UINT; MipFilter: UINT; pSrcInfo:LPD3DX10_IMAGE_INFO; end record; --subtype D3DX10_IMAGE_LOAD_INFO is D3DX10_IMAGE_LOAD_INFO; type LPD3DX10_IMAGE_LOAD_INFO is access all D3DX10_IMAGE_LOAD_INFO; type LPHRESULT is access all HRESULT; function D3DX10GetImageInfoFromFileA(pSrcFile:LPCSTR;pPump:LPID3DX10ThreadPump;pSrcInfo:LPD3DX10_IMAGE_INFO;pHResult:LPHRESULT) return HRESULT with Import,Convention=>stdcall,external_name=>"D3DX10GetImageInfoFromFileA"; function D3DX10GetImageInfoFromFileW(pSrcFile:LPCWSTR;pPump:LPID3DX10ThreadPump;pSrcInfo:LPD3DX10_IMAGE_INFO;pHResult:LPHRESULT) return HRESULT with Import,Convention=>stdcall,external_name=>"D3DX10GetImageInfoFromFileW"; function D3DX10GetImageInfoFromResourceA(hSrcModule:HMODULE;pSrcResource:LPCSTR;pPump:LPID3DX10ThreadPump;pSrcInfo:LPD3DX10_IMAGE_INFO;pHResult:LPHRESULT) return HRESULT with Import,Convention=>stdcall,external_name=>"D3DX10GetImageInfoFromResourceA"; function D3DX10GetImageInfoFromResourceW(hSrcModule:HMODULE;pSrcResource:LPCWSTR;pPump:LPID3DX10ThreadPump;pSrcInfo:LPD3DX10_IMAGE_INFO;pHResult:LPHRESULT) return HRESULT with Import,Convention=>stdcall,external_name=>"D3DX10GetImageInfoFromResourceW"; function D3DX10GetImageInfoFromMemory(pSrcData:LPCVOID;SrcDataSize:SIZE_T;pPump:LPID3DX10ThreadPump;pSrcInfo:LPD3DX10_IMAGE_INFO;pHResult:LPHRESULT) return HRESULT with Import,Convention=>stdcall,external_name=>"D3DX10GetImageInfoFromMemory"; function D3DX10CreateShaderResourceViewFromFileA(pDevice:LPID3D10Device;pSrcFile:LPCSTR;pLoadInfo:LPD3DX10_IMAGE_LOAD_INFO;pPump:LPID3DX10ThreadPump;ppShaderResourceView:LPLPID3D10ShaderResourceView;pHResult:LPHRESULT) return HRESULT with Import,Convention=>stdcall,external_name=>"D3DX10CreateShaderResourceViewFromFileA"; function D3DX10CreateShaderResourceViewFromFileW(pDevice:LPID3D10Device;pSrcFile:LPCWSTR;pLoadInfo:LPD3DX10_IMAGE_LOAD_INFO;pPump:LPID3DX10ThreadPump;ppShaderResourceView:LPLPID3D10ShaderResourceView;pHResult:LPHRESULT) return HRESULT with Import,Convention=>stdcall,external_name=>"D3DX10CreateShaderResourceViewFromFileW"; function D3DX10CreateTextureFromFileA(pDevice:LPID3D10Device;pSrcFile:LPCSTR;pLoadInfo:LPD3DX10_IMAGE_LOAD_INFO;pPump:LPID3DX10ThreadPump;ppTexture:LPLPID3D10Resource;pHResult:LPHRESULT) return HRESULT with Import,Convention=>stdcall,external_name=>"D3DX10CreateTextureFromFileA"; function D3DX10CreateTextureFromFileW(pDevice:LPID3D10Device;pSrcFile:LPCWSTR;pLoadInfo:LPD3DX10_IMAGE_LOAD_INFO;pPump:LPID3DX10ThreadPump;ppTexture:LPLPID3D10Resource;pHResult:LPHRESULT) return HRESULT with Import,Convention=>stdcall,external_name=>"D3DX10CreateTextureFromFileW"; function D3DX10CreateShaderResourceViewFromResourceA(pDevice:LPID3D10Device;hSrcModule:HMODULE;pSrcResource:LPCSTR;pLoadInfo:LPD3DX10_IMAGE_LOAD_INFO;pPump:LPID3DX10ThreadPump;ppShaderResourceView:LPLPID3D10ShaderResourceView;pHResult:LPHRESULT) return HRESULT with Import,Convention=>stdcall,external_name=>"D3DX10CreateShaderResourceViewFromResourceA"; function D3DX10CreateShaderResourceViewFromResourceW(pDevice:LPID3D10Device;hSrcModule:HMODULE;pSrcResource:LPCWSTR;pLoadInfo:LPD3DX10_IMAGE_LOAD_INFO;pPump:LPID3DX10ThreadPump;ppShaderResourceView:LPLPID3D10ShaderResourceView;pHResult:LPHRESULT) return HRESULT with Import,Convention=>stdcall,external_name=>"D3DX10CreateShaderResourceViewFromResourceW"; function D3DX10CreateTextureFromResourceA(pDevice:LPID3D10Device;hSrcModule:HMODULE;pSrcResource:LPCSTR;pLoadInfo:LPD3DX10_IMAGE_LOAD_INFO;pPump:LPID3DX10ThreadPump;ppTexture:LPLPID3D10Resource;pHResult:LPHRESULT) return HRESULT with Import,Convention=>stdcall,external_name=>"D3DX10CreateTextureFromResourceA"; function D3DX10CreateTextureFromResourceW(pDevice:LPID3D10Device;hSrcModule:HMODULE;pSrcResource:LPCWSTR;pLoadInfo:LPD3DX10_IMAGE_LOAD_INFO;pPump:LPID3DX10ThreadPump;ppTexture:LPLPID3D10Resource;pHResult:LPHRESULT) return HRESULT with Import,Convention=>stdcall,external_name=>"D3DX10CreateTextureFromResourceW"; function D3DX10CreateShaderResourceViewFromMemory(pDevice:LPID3D10Device;pSrcData:LPCVOID;SrcDataSize:SIZE_T;pLoadInfo:LPD3DX10_IMAGE_LOAD_INFO;pPump:LPID3DX10ThreadPump;ppShaderResourceView:LPLPID3D10ShaderResourceView;pHResult:LPHRESULT) return HRESULT with Import,Convention=>stdcall,external_name=>"D3DX10CreateShaderResourceViewFromMemory"; function D3DX10CreateTextureFromMemory(pDevice:LPID3D10Device;pSrcData:LPCVOID;SrcDataSize:SIZE_T;pLoadInfo:LPD3DX10_IMAGE_LOAD_INFO;pPump:LPID3DX10ThreadPump;ppTexture:LPLPID3D10Resource;pHResult:LPHRESULT) return HRESULT with Import,Convention=>stdcall,external_name=>"D3DX10CreateTextureFromMemory"; type tagD3DX10_TEXTURE_LOAD_INFO is record pSrcBox:LPD3D10_BOX; pDstBox:LPD3D10_BOX; SrcFirstMip: UINT; DstFirstMip: UINT; NumMips: UINT; SrcFirstElement: UINT; DstFirstElement: UINT; NumElements: UINT; Filter: UINT; MipFilter: UINT; end record; subtype D3DX10_TEXTURE_LOAD_INFO is tagD3DX10_TEXTURE_LOAD_INFO; type LPD3DX10_TEXTURE_LOAD_INFO is access all tagD3DX10_TEXTURE_LOAD_INFO; function D3DX10LoadTextureFromTexture(pSrcTexture:LPID3D10Resource;pLoadInfo:LPD3DX10_TEXTURE_LOAD_INFO;pDstTexture:LPID3D10Resource) return HRESULT with Import,Convention=>stdcall,external_name=>"D3DX10LoadTextureFromTexture"; function D3DX10FilterTexture(pTexture:LPID3D10Resource;SrcLevel:UINT;MipFilter:UINT) return HRESULT with Import,Convention=>stdcall,external_name=>"D3DX10FilterTexture"; function D3DX10SaveTextureToFileA(pSrcTexture:LPID3D10Resource;DestFormat:D3DX10_IMAGE_FILE_FORMAT;pDestFile:LPCSTR) return HRESULT with Import,Convention=>stdcall,external_name=>"D3DX10SaveTextureToFileA"; function D3DX10SaveTextureToFileW(pSrcTexture:LPID3D10Resource;DestFormat:D3DX10_IMAGE_FILE_FORMAT;pDestFile:LPCWSTR) return HRESULT with Import,Convention=>stdcall,external_name=>"D3DX10SaveTextureToFileW"; function D3DX10SaveTextureToMemory(pSrcTexture:LPID3D10Resource;DestFormat:D3DX10_IMAGE_FILE_FORMAT;ppDestBuf:LPLPD3D10BLOB;Flags:UINT) return HRESULT with Import,Convention=>stdcall,external_name=>"D3DX10SaveTextureToMemory"; function D3DX10ComputeNormalMap(pSrcTexture:LPID3D10Texture2D;Flags:UINT;Channel:UINT;Amplitude:FLOAT;pDestTexture:LPID3D10Texture2D) return HRESULT with Import,Convention=>stdcall,external_name=>"D3DX10ComputeNormalMap"; function D3DX10SHProjectCubeMap(Order:UINT;pCubeMap:LPID3D10Texture2D;pROut:LPFLOAT;pGOut:LPFLOAT;pBOut:LPFLOAT) return HRESULT with Import,Convention=>stdcall,external_name=>"D3DX10SHProjectCubeMap"; end d3dx10tex;

 

转载请注明原文地址: https://www.6miu.com/read-5031585.html

最新回复(0)