----------------------------------------
-- File : d3dx9shader.ads --
-- Translator:Dongfeng.Gu,2018/10/17 --
-- Mail: 515639@qq.com --
-- Progress:100% --
----------------------------------------
with win32; use win32;
with win32.rpcdce; use win32.rpcdce;
with win32.objbase; use win32.objbase;
with win32.windef; use win32.windef;
with Interfaces.C;
with d3d9; use d3d9;
with d3d9types; use d3d9types;
with d3dx9core; use d3dx9core;
package d3dx9shader is
use type interfaces.C.unsigned;
use type interfaces.C.unsigned_Long;
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));
subtype LPLPVOID is PPVOID;
subtype LPUINT is win32.PUINT;
type LPCBOOL is access constant Bool;
type LPCInt is access constant int;
type LPCFLOAT is access constant float;
type LPCDWORD is access constant dword;
type LPLPCVOID is access LPCVOID;
--
-- Macro function
--
function D3DXTX_VERSION(Major,Minor:dword) return dword is (Lsh(character'pos('T'),24) or Lsh(character'pos('X'),16) or Lsh((Major),8) or (Minor));
D3DXSHADER_DEBUG : constant dword:= Lsh(1,0);
D3DXSHADER_SKIPVALIDATION : constant dword:= Lsh(1,1);
D3DXSHADER_SKIPOPTIMIZATION : constant dword:= Lsh(1,2);
D3DXSHADER_PACKMATRIX_ROWMAJOR : constant dword:= Lsh(1,3);
D3DXSHADER_PACKMATRIX_COLUMNMAJOR : constant dword:= Lsh(1,4);
D3DXSHADER_PARTIALPRECISION : constant dword:= Lsh(1,5);
D3DXSHADER_FORCE_VS_SOFTWARE_NOOPT : constant dword:= Lsh(1,6);
D3DXSHADER_FORCE_PS_SOFTWARE_NOOPT : constant dword:= Lsh(1,7);
D3DXSHADER_NO_PRESHADER : constant dword:= Lsh(1,8);
D3DXSHADER_AVOID_FLOW_CONTROL : constant dword:= Lsh(1,9);
D3DXSHADER_PREFER_FLOW_CONTROL : constant dword:= Lsh(1,10);
D3DXSHADER_ENABLE_BACKWARDS_COMPATIBILITY : constant dword:= Lsh(1,12);
D3DXSHADER_IEEE_STRICTNESS : constant dword:= Lsh(1,13);
D3DXSHADER_USE_LEGACYtagD3DX9_31_DLL : constant dword:= Lsh(1,16);
D3DXSHADER_OPTIMIZATION_LEVEL0 : constant dword:= Lsh(1,14);
D3DXSHADER_OPTIMIZATION_LEVEL1 : constant := 0;
D3DXSHADER_OPTIMIZATION_LEVEL2 : constant dword:= (Lsh(1,14) or Lsh(1,15));
D3DXSHADER_OPTIMIZATION_LEVEL3 : constant dword:= Lsh(1,15);
D3DXCONSTTABLE_LARGEADDRESSAWARE : constant dword:= Lsh(1,17);
-- subtype D3DXHANDLE is LPCSTR;
subtype D3DXHANDLE is UINT_PTR;
type LPD3DXHANDLE is access all D3DXHANDLE;
type tagD3DXMACRO is record
Name:LPCSTR;
Definition:LPCSTR;
end record;
subtype D3DXMACRO is tagD3DXMACRO;
type LPD3DXMACRO is access all tagD3DXMACRO;
type tagD3DXSEMANTIC is record
Usage:UINT;
UsageIndex:UINT;
end record;
subtype D3DXSEMANTIC is tagD3DXSEMANTIC;
type LPD3DXSEMANTIC is access all tagD3DXSEMANTIC;
type tagD3DXREGISTER_SET is (D3DXRS_BOOL,
D3DXRS_INT4,
D3DXRS_FLOAT4,
D3DXRS_SAMPLER,
D3DXRS_FORCE_DWORD);
for tagD3DXREGISTER_SET use (D3DXRS_BOOL=>0,
D3DXRS_INT4=>1,
D3DXRS_FLOAT4=>2,
D3DXRS_SAMPLER=>3,
D3DXRS_FORCE_DWORD=>16#7fffffff#);
subtype D3DXREGISTER_SET is tagD3DXREGISTER_SET;
type LPD3DXREGISTER_SET is access tagD3DXREGISTER_SET;
type tagD3DXPARAMETER_CLASS is (D3DXPC_SCALAR,
D3DXPC_VECTOR,
D3DXPC_MATRIX_ROWS,
D3DXPC_MATRIX_COLUMNS,
D3DXPC_OBJECT,
D3DXPC_STRUCT,
D3DXPC_FORCE_DWORD);
for tagD3DXPARAMETER_CLASS use (D3DXPC_SCALAR=>0,
D3DXPC_VECTOR=>1,
D3DXPC_MATRIX_ROWS=>2,
D3DXPC_MATRIX_COLUMNS=>3,
D3DXPC_OBJECT=>4,
D3DXPC_STRUCT=>5,
D3DXPC_FORCE_DWORD=>16#7fffffff#);
subtype D3DXPARAMETER_CLASS is tagD3DXPARAMETER_CLASS;
type LPD3DXPARAMETER_CLASS is access tagD3DXPARAMETER_CLASS;
type tagD3DXPARAMETER_TYPE is (D3DXPT_VOID,
D3DXPT_BOOL,
D3DXPT_INT,
D3DXPT_FLOAT,
D3DXPT_STRING,
D3DXPT_TEXTURE,
D3DXPT_TEXTURE1D,
D3DXPT_TEXTURE2D,
D3DXPT_TEXTURE3D,
D3DXPT_TEXTURECUBE,
D3DXPT_SAMPLER,
D3DXPT_SAMPLER1D,
D3DXPT_SAMPLER2D,
D3DXPT_SAMPLER3D,
D3DXPT_SAMPLERCUBE,
D3DXPT_PIXELSHADER,
D3DXPT_VERTEXSHADER,
D3DXPT_PIXELFRAGMENT,
D3DXPT_VERTEXFRAGMENT,
D3DXPT_UNSUPPORTED,
D3DXPT_FORCE_DWORD);
for tagD3DXPARAMETER_TYPE use (D3DXPT_VOID=>0,
D3DXPT_BOOL=>1,
D3DXPT_INT=>2,
D3DXPT_FLOAT=>3,
D3DXPT_STRING=>4,
D3DXPT_TEXTURE=>5,
D3DXPT_TEXTURE1D=>6,
D3DXPT_TEXTURE2D=>7,
D3DXPT_TEXTURE3D=>8,
D3DXPT_TEXTURECUBE=>9,
D3DXPT_SAMPLER=>10,
D3DXPT_SAMPLER1D=>11,
D3DXPT_SAMPLER2D=>12,
D3DXPT_SAMPLER3D=>13,
D3DXPT_SAMPLERCUBE=>14,
D3DXPT_PIXELSHADER=>15,
D3DXPT_VERTEXSHADER=>16,
D3DXPT_PIXELFRAGMENT=>17,
D3DXPT_VERTEXFRAGMENT=>18,
D3DXPT_UNSUPPORTED=>19,
D3DXPT_FORCE_DWORD=>16#7fffffff#);
subtype D3DXPARAMETER_TYPE is tagD3DXPARAMETER_TYPE;
type LPD3DXPARAMETER_TYPE is access tagD3DXPARAMETER_TYPE;
type tagD3DXCONSTANTTABLE_DESC is record
Creator:LPCSTR;
Version:DWORD;
Constants:UINT;
end record;
subtype D3DXCONSTANTTABLE_DESC is tagD3DXCONSTANTTABLE_DESC;
type LPD3DXCONSTANTTABLE_DESC is access all tagD3DXCONSTANTTABLE_DESC;
type tagD3DXCONSTANT_DESC is record
Name:LPCSTR;
RegisterSet:D3DXREGISTER_SET;
RegisterIndex:UINT;
RegisterCount:UINT;
Class:D3DXPARAMETER_CLASS;
Typ:D3DXPARAMETER_TYPE;
Rows:UINT;
Columns:UINT;
Elements:UINT;
StructMembers:UINT;
Bytes:UINT;
DefaultValue:LPCVOID;
end record;
subtype D3DXCONSTANT_DESC is tagD3DXCONSTANT_DESC;
type LPD3DXCONSTANT_DESC is access all tagD3DXCONSTANT_DESC;
type ID3DXConstantTable;
type LPID3DXCONSTANTTABLE is access all ID3DXConstantTable;
subtype LPD3DXCONSTANTTABLE is LPID3DXCONSTANTTABLE;
IID_ID3DXConstantTable:constant win32.rpcdce.GUID:=(16#ab3c758f#,16#93e#,16#4356#,(16#b7#,16#62#,16#4d#,16#b1#,16#8f#,16#1b#,16#3a#,16#1#));
type LPCD3DMATRIX is access constant D3DMATRIX;
type ID3DXConstantTable is record
QueryInterface:access procedure(THIS:LPID3DXConstantTable;iid:REFIID;ppv:LPLPVOID) with Convention=>Stdcall;
AddRef:access function(THIS:LPID3DXConstantTable) return ULONG with Convention=>Stdcall;
Release:access function(THIS:LPID3DXConstantTable) return ULONG with Convention=>Stdcall;
GetBufferPointer:access function(THIS:LPID3DXConstantTable) return LPVOID with Convention=>Stdcall;
GetBufferSize:access function(THIS:LPID3DXConstantTable) return DWORD with Convention=>Stdcall;
GetDesc:access procedure(THIS:LPID3DXConstantTable;pDesc:LPD3DXCONSTANTTABLE_DESC) with Convention=>Stdcall;
GetConstantDesc:access procedure(THIS:LPID3DXConstantTable;hConstant:D3DXHANDLE;pConstantDesc:LPD3DXCONSTANT_DESC;pCount:LPUINT) with Convention=>Stdcall;
GetSamplerIndex:access function(THIS:LPID3DXConstantTable;hConstant:D3DXHANDLE) return UINT with Convention=>Stdcall;
GetConstant:access function(THIS:LPID3DXConstantTable;hConstant:D3DXHANDLE;Index:UINT) return D3DXHANDLE with Convention=>Stdcall;
GetConstantByName:access function(THIS:LPID3DXConstantTable;hConstant:D3DXHANDLE;pName:LPCSTR) return D3DXHANDLE with Convention=>Stdcall;
GetConstantElement:access function(THIS:LPID3DXConstantTable;hConstant:D3DXHANDLE;Index:UINT) return D3DXHANDLE with Convention=>Stdcall;
SetDefaults:access procedure(THIS:LPID3DXConstantTable;pDevice:LPDIRECT3DDEVICE9) with Convention=>Stdcall;
SetValue:access procedure(THIS:LPID3DXConstantTable;pDevice:LPDIRECT3DDEVICE9;hConstant:D3DXHANDLE;pData:LPCVOID;Bytes:UINT) with Convention=>Stdcall;
SetBool:access procedure(THIS:LPID3DXConstantTable;pDevice:LPDIRECT3DDEVICE9;hConstant:D3DXHANDLE;b:BOOL) with Convention=>Stdcall;
SetBoolArray:access procedure(THIS:LPID3DXConstantTable;pDevice:LPDIRECT3DDEVICE9;hConstant:D3DXHANDLE;pb:LPCBOOL;Count:UINT) with Convention=>Stdcall;
SetInt:access procedure(THIS:LPID3DXConstantTable;pDevice:LPDIRECT3DDEVICE9;hConstant:D3DXHANDLE;n:INT) with Convention=>Stdcall;
SetIntArray:access procedure(THIS:LPID3DXConstantTable;pDevice:LPDIRECT3DDEVICE9;hConstant:D3DXHANDLE;pn:LPCINT;Count:UINT) with Convention=>Stdcall;
SetFloat:access procedure(THIS:LPID3DXConstantTable;pDevice:LPDIRECT3DDEVICE9;hConstant:D3DXHANDLE;f:FLOAT) with Convention=>Stdcall;
SetFloatArray:access procedure(THIS:LPID3DXConstantTable;pDevice:LPDIRECT3DDEVICE9;hConstant:D3DXHANDLE;pf:LPCFLOAT;Count:UINT) with Convention=>Stdcall;
SetVector:access procedure(THIS:LPID3DXConstantTable;pDevice:LPDIRECT3DDEVICE9;hConstant:D3DXHANDLE;pVector:access constant D3DXVECTOR4) with Convention=>Stdcall;
SetVectorArray:access procedure(THIS:LPID3DXConstantTable;pDevice:LPDIRECT3DDEVICE9;hConstant:D3DXHANDLE;pVector:access constant D3DXVECTOR4;Count:UINT) with Convention=>Stdcall;
SetMatrix:access procedure(THIS:LPID3DXConstantTable;pDevice:LPDIRECT3DDEVICE9;hConstant:D3DXHANDLE;pMatrix:access constant D3DMATRIX) with Convention=>Stdcall;
SetMatrixArray:access procedure(THIS:LPID3DXConstantTable;pDevice:LPDIRECT3DDEVICE9;hConstant:D3DXHANDLE;pMatrix:access constant D3DMATRIX;Count:UINT) with Convention=>Stdcall;
SetMatrixPointerArray:access procedure(THIS:LPID3DXConstantTable;pDevice:LPDIRECT3DDEVICE9;hConstant:D3DXHANDLE;ppMatrix:access LPCD3DMATRIX;Count:UINT) with Convention=>Stdcall;
SetMatrixTranspose:access procedure(THIS:LPID3DXConstantTable;pDevice:LPDIRECT3DDEVICE9;hConstant:D3DXHANDLE;pMatrix:access constant D3DMATRIX) with Convention=>Stdcall;
SetMatrixTransposeArray:access procedure(THIS:LPID3DXConstantTable;pDevice:LPDIRECT3DDEVICE9;hConstant:D3DXHANDLE;pMatrix:access constant D3DMATRIX;Count:UINT) with Convention=>Stdcall;
SetMatrixTransposePointerArray:access procedure(THIS:LPID3DXConstantTable;pDevice:LPDIRECT3DDEVICE9;hConstant:D3DXHANDLE;ppMatrix:access LPCD3DMATRIX;Count:UINT) with Convention=>Stdcall;
end record;
--
-- Interface ID3DXTextureShader
--
type ID3DXTextureShader;
type LPID3DXTEXTURESHADER is access all ID3DXTextureShader;
subtype LPD3DXTEXTURESHADER is LPID3DXTEXTURESHADER;
type LPLPD3DXTEXTURESHADER is access all LPD3DXTEXTURESHADER;
IID_ID3DXTextureShader:constant win32.rpcdce.GUID:=(16#3e3d67f8#,16#aa7a#,16#405d#,(16#a8#,16#57#,16#ba#,16#1#,16#d4#,16#75#,16#84#,16#26#));
type ID3DXTextureShader is record
QueryInterface:access procedure(THIS:LPID3DXTextureShader;iid:REFIID;ppv:LPLPVOID) with Convention=>Stdcall;
AddRef:access function(THIS:LPID3DXTextureShader) return ULONG with Convention=>Stdcall;
Release:access function(THIS:LPID3DXTextureShader) return ULONG with Convention=>Stdcall;
GetFunction:access procedure(THIS:LPID3DXTextureShader;ppFunction:LPLPD3DXBUFFER) with Convention=>Stdcall;
GetConstantBuffer:access procedure(THIS:LPID3DXTextureShader;ppConstantBuffer:LPLPD3DXBUFFER) with Convention=>Stdcall;
GetDesc:access procedure(THIS:LPID3DXTextureShader;pDesc:LPD3DXCONSTANTTABLE_DESC) with Convention=>Stdcall;
GetConstantDesc:access procedure(THIS:LPID3DXTextureShader;hConstant:D3DXHANDLE;pConstantDesc:LPD3DXCONSTANT_DESC;pCount:LPUINT) with Convention=>Stdcall;
GetConstant:access function(THIS:LPID3DXTextureShader;hConstant:D3DXHANDLE;Index:UINT) return D3DXHANDLE with Convention=>Stdcall;
GetConstantByName:access function(THIS:LPID3DXTextureShader;hConstant:D3DXHANDLE;pName:LPCSTR) return D3DXHANDLE with Convention=>Stdcall;
GetConstantElement:access function(THIS:LPID3DXTextureShader;hConstant:D3DXHANDLE;Index:UINT) return D3DXHANDLE with Convention=>Stdcall;
SetDefaults:access procedure(THIS:LPID3DXTextureShader) with Convention=>Stdcall;
SetValue:access procedure(THIS:LPID3DXTextureShader;hConstant:D3DXHANDLE;pData:LPCVOID;Bytes:UINT) with Convention=>Stdcall;
SetBool:access procedure(THIS:LPID3DXTextureShader;hConstant:D3DXHANDLE;b:BOOL) with Convention=>Stdcall;
SetBoolArray:access procedure(THIS:LPID3DXTextureShader;hConstant:D3DXHANDLE;pb:LPCBOOL;Count:UINT) with Convention=>Stdcall;
SetInt:access procedure(THIS:LPID3DXTextureShader;hConstant:D3DXHANDLE;n:INT) with Convention=>Stdcall;
SetIntArray:access procedure(THIS:LPID3DXTextureShader;hConstant:D3DXHANDLE;pn:LPCINT;Count:UINT) with Convention=>Stdcall;
SetFloat:access procedure(THIS:LPID3DXTextureShader;hConstant:D3DXHANDLE;f:FLOAT) with Convention=>Stdcall;
SetFloatArray:access procedure(THIS:LPID3DXTextureShader;hConstant:D3DXHANDLE;pf:LPCFLOAT;Count:UINT) with Convention=>Stdcall;
SetVector:access procedure(THIS:LPID3DXTextureShader;hConstant:D3DXHANDLE;pVector:access constant D3DXVECTOR4) with Convention=>Stdcall;
SetVectorArray:access procedure(THIS:LPID3DXTextureShader;hConstant:D3DXHANDLE;pVector:access constant D3DXVECTOR4;Count:UINT) with Convention=>Stdcall;
SetMatrix:access procedure(THIS:LPID3DXTextureShader;hConstant:D3DXHANDLE;pMatrix:access constant D3DMATRIX) with Convention=>Stdcall;
SetMatrixArray:access procedure(THIS:LPID3DXTextureShader;hConstant:D3DXHANDLE;pMatrix:access constant D3DMATRIX;Count:UINT) with Convention=>Stdcall;
SetMatrixPointerArray:access procedure(THIS:LPID3DXTextureShader;hConstant:D3DXHANDLE;ppMatrix:access LPCD3DMATRIX;Count:UINT) with Convention=>Stdcall;
SetMatrixTranspose:access procedure(THIS:LPID3DXTextureShader;hConstant:D3DXHANDLE;pMatrix:access constant D3DMATRIX) with Convention=>Stdcall;
SetMatrixTransposeArray:access procedure(THIS:LPID3DXTextureShader;hConstant:D3DXHANDLE;pMatrix:LPCD3DMATRIX;Count:UINT) with Convention=>Stdcall;
SetMatrixTransposePointerArray:access procedure(THIS:LPID3DXTextureShader;hConstant:D3DXHANDLE;ppMatrix:access LPCD3DMATRIX;Count:UINT) with Convention=>Stdcall;
end record;
type tagD3DXINCLUDE_TYPE is (D3DXINC_LOCAL,
D3DXINC_SYSTEM,
D3DXINC_FORCE_DWORD);
for tagD3DXINCLUDE_TYPE use (D3DXINC_LOCAL=>0,
D3DXINC_SYSTEM=>1,
D3DXINC_FORCE_DWORD=>16#7fffffff#);
subtype D3DXINCLUDE_TYPE is tagD3DXINCLUDE_TYPE;
type LPD3DXINCLUDE_TYPE is access tagD3DXINCLUDE_TYPE;
type ID3DXInclude;
type LPID3DXINCLUDE is access all ID3DXInclude;
subtype LPD3DXINCLUDE is LPID3DXINCLUDE;
type ID3DXInclude is record
Open:access procedure(THIS:LPID3DXInclude;IncludeType:D3DXINCLUDE_TYPE;pFileName:LPCSTR;pParentData:LPCVOID;ppData:LPLPCVOID;pBytes:LPUINT) with Convention=>Stdcall;
Close:access procedure(THIS:LPID3DXInclude;pData:LPCVOID) with Convention=>Stdcall;
end record;
function D3DXAssembleShaderFromFileA(
pSrcFile:LPCSTR;
pDefines:access constant D3DXMACRO;
pInclude:LPD3DXINCLUDE;
Flags:DWORD;
ppShader:access LPD3DXBUFFER;
ppErrorMsgs:access LPD3DXBUFFER) return HRESULT with Import,Convention=>stdcall,External_Name=>"D3DXAssembleShaderFromFileA";
function D3DXAssembleShaderFromFile(
pSrcFile:LPCSTR;
pDefines:access constant D3DXMACRO;
pInclude:LPD3DXINCLUDE;
Flags:DWORD;
ppShader:access LPD3DXBUFFER;
ppErrorMsgs:access LPD3DXBUFFER) return HRESULT with Import,Convention=>stdcall,External_Name=>"D3DXAssembleShaderFromFileA";
function D3DXAssembleShaderFromFileW(pSrcFile:LPCWSTR;pDefines:access constant D3DXMACRO;pInclude:LPD3DXINCLUDE;Flags:DWORD;ppShader:LPLPD3DXBUFFER;ppErrorMsgs:LPLPD3DXBUFFER) return HRESULT with Import,Convention=>stdcall,external_name=>"D3DXAssembleShaderFromFileW";
function D3DXAssembleShaderFromResourceA(hSrcModule:HMODULE;pSrcResource:LPCSTR;pDefines:access constant D3DXMACRO;pInclude:LPD3DXINCLUDE;Flags:DWORD;ppShader:LPLPD3DXBUFFER;ppErrorMsgs:LPLPD3DXBUFFER) return HRESULT with Import,Convention=>stdcall,external_name=>"D3DXAssembleShaderFromResourceA";
function D3DXAssembleShaderFromResource(hSrcModule:HMODULE;pSrcResource:LPCSTR;pDefines:access constant D3DXMACRO;pInclude:LPD3DXINCLUDE;Flags:DWORD;ppShader:LPLPD3DXBUFFER;ppErrorMsgs:LPLPD3DXBUFFER) return HRESULT with Import,Convention=>stdcall,external_name=>"D3DXAssembleShaderFromResourceA";
function D3DXAssembleShaderFromResourceW(hSrcModule:HMODULE;pSrcResource:LPCWSTR;pDefines:access constant D3DXMACRO;pInclude:LPD3DXINCLUDE;Flags:DWORD;ppShader:LPLPD3DXBUFFER;ppErrorMsgs:LPLPD3DXBUFFER) return HRESULT with Import,Convention=>stdcall,external_name=>"D3DXAssembleShaderFromResourceW";
function D3DXAssembleShader(pSrcData:LPCSTR;SrcDataLen:UINT;pDefines:access constant D3DXMACRO;pInclude:LPD3DXINCLUDE;Flags:DWORD;ppShader:LPLPD3DXBUFFER;ppErrorMsgs:LPLPD3DXBUFFER) return HRESULT with Import,Convention=>stdcall,external_name=>"D3DXAssembleShader";
function D3DXCompileShaderFromFileA(pSrcFile:LPCSTR;pDefines:access constant D3DXMACRO;pInclude:LPD3DXINCLUDE;pFunctionName:LPCSTR;pProfile:LPCSTR;Flags:DWORD;ppShader:LPLPD3DXBUFFER;ppErrorMsgs:LPLPD3DXBUFFER;ppConstantTable:access LPD3DXCONSTANTTABLE) return HRESULT with Import,Convention=>stdcall,external_name=>"D3DXCompileShaderFromFileA";
function D3DXCompileShaderFromFile(pSrcFile:LPCSTR;pDefines:access constant D3DXMACRO;pInclude:LPD3DXINCLUDE;pFunctionName:LPCSTR;pProfile:LPCSTR;Flags:DWORD;ppShader:LPLPD3DXBUFFER;ppErrorMsgs:LPLPD3DXBUFFER;ppConstantTable:access LPD3DXCONSTANTTABLE) return HRESULT with Import,Convention=>stdcall,external_name=>"D3DXCompileShaderFromFileA";
function D3DXCompileShaderFromFileW(pSrcFile:LPCWSTR;pDefines:access constant D3DXMACRO;pInclude:LPD3DXINCLUDE;pFunctionName:LPCSTR;pProfile:LPCSTR;Flags:DWORD;ppShader:LPLPD3DXBUFFER;ppErrorMsgs:LPLPD3DXBUFFER;ppConstantTable:access LPD3DXCONSTANTTABLE) return HRESULT with Import,Convention=>stdcall,external_name=>"D3DXCompileShaderFromFileW";
function D3DXCompileShaderFromResourceA(hSrcModule:HMODULE;pSrcResource:LPCSTR;pDefines:access constant D3DXMACRO;pInclude:LPD3DXINCLUDE;pFunctionName:LPCSTR;pProfile:LPCSTR;Flags:DWORD;ppShader:LPLPD3DXBUFFER;ppErrorMsgs:LPLPD3DXBUFFER;ppConstantTable:access LPD3DXCONSTANTTABLE) return HRESULT with Import,Convention=>stdcall,external_name=>"D3DXCompileShaderFromResourceA";
function D3DXCompileShaderFromResource(hSrcModule:HMODULE;pSrcResource:LPCSTR;pDefines:access constant D3DXMACRO;pInclude:LPD3DXINCLUDE;pFunctionName:LPCSTR;pProfile:LPCSTR;Flags:DWORD;ppShader:LPLPD3DXBUFFER;ppErrorMsgs:LPLPD3DXBUFFER;ppConstantTable:access LPD3DXCONSTANTTABLE) return HRESULT with Import,Convention=>stdcall,external_name=>"D3DXCompileShaderFromResourceA";
function D3DXCompileShaderFromResourceW(hSrcModule:HMODULE;pSrcResource:LPCWSTR;pDefines:access constant D3DXMACRO;pInclude:LPD3DXINCLUDE;pFunctionName:LPCSTR;pProfile:LPCSTR;Flags:DWORD;ppShader:LPLPD3DXBUFFER;ppErrorMsgs:LPLPD3DXBUFFER;ppConstantTable:access LPD3DXCONSTANTTABLE) return HRESULT with Import,Convention=>stdcall,external_name=>"D3DXCompileShaderFromResourceW";
function D3DXCompileShader(pSrcData:LPCSTR;SrcDataLen:UINT;pDefines:access constant D3DXMACRO;pInclude:LPD3DXINCLUDE;pFunctionName:LPCSTR;pProfile:LPCSTR;Flags:DWORD;ppShader:LPLPD3DXBUFFER;ppErrorMsgs:LPLPD3DXBUFFER;ppConstantTable:access LPD3DXCONSTANTTABLE) return HRESULT with Import,Convention=>stdcall,external_name=>"D3DXCompileShader";
function D3DXDisassembleShader(pShader:LPCDWORD;EnableColorCode:BOOL;pComments:LPCSTR;ppDisassembly:LPLPD3DXBUFFER) return HRESULT with Import,Convention=>stdcall,external_name=>"D3DXDisassembleShader";
function D3DXGetPixelShaderProfile(pDevice:LPDIRECT3DDEVICE9) return LPCSTR with Import,Convention=>stdcall,external_name=>"D3DXGetPixelShaderProfile";
function D3DXGetVertexShaderProfile(pDevice:LPDIRECT3DDEVICE9) return LPCSTR with Import,Convention=>stdcall,external_name=>"D3DXGetVertexShaderProfile";
function D3DXFindShaderComment(pFunction:LPCDWORD;FourCC:DWORD;ppData:LPLPCVOID;pSizeInBytes:LPUINT) return HRESULT with Import,Convention=>stdcall,external_name=>"D3DXFindShaderComment";
function D3DXGetShaderSize(pFunction:LPCDWORD) return HRESULT with Import,Convention=>stdcall,external_name=>"D3DXGetShaderSize";
function D3DXGetShaderVersion(pFunction:LPCDWORD) return HRESULT with Import,Convention=>stdcall,external_name=>"D3DXGetShaderVersion";
function D3DXGetShaderInputSemantics(pFunction:LPCDWORD;pSemantics:LPD3DXSEMANTIC;pCount:LPUINT) return HRESULT with Import,Convention=>stdcall,external_name=>"D3DXGetShaderInputSemantics";
function D3DXGetShaderOutputSemantics(pFunction:LPCDWORD;pSemantics:LPD3DXSEMANTIC;pCount:LPUINT) return HRESULT with Import,Convention=>stdcall,external_name=>"D3DXGetShaderOutputSemantics";
function D3DXGetShaderSamplers(pFunction:LPCDWORD;pSamplers:access LPCSTR;pCount:LPUINT) return HRESULT with Import,Convention=>stdcall,external_name=>"D3DXGetShaderSamplers";
function D3DXGetShaderConstantTable(pFunction:LPCDWORD;ppConstantTable:access LPD3DXCONSTANTTABLE) return HRESULT with Import,Convention=>stdcall,external_name=>"D3DXGetShaderConstantTable";
function D3DXGetShaderConstantTableEx(pFunction:LPCDWORD;Flags:DWORD;ppConstantTable:access LPD3DXCONSTANTTABLE) return HRESULT with Import,Convention=>stdcall,external_name=>"D3DXGetShaderConstantTableEx";
function D3DXCreateTextureShader(pFunction:LPCDWORD;ppTextureShader:LPLPD3DXTEXTURESHADER) return HRESULT with Import,Convention=>stdcall,external_name=>"D3DXCreateTextureShader";
function D3DXPreprocessShaderFromFileA(pSrcFile:LPCSTR;pDefines:access constant D3DXMACRO;pInclude:LPD3DXINCLUDE;ppShaderText:LPLPD3DXBUFFER;ppErrorMsgs:LPLPD3DXBUFFER) return HRESULT with Import,Convention=>stdcall,external_name=>"D3DXPreprocessShaderFromFileA";
function D3DXPreprocessShaderFromFile(pSrcFile:LPCSTR;pDefines:access constant D3DXMACRO;pInclude:LPD3DXINCLUDE;ppShaderText:LPLPD3DXBUFFER;ppErrorMsgs:LPLPD3DXBUFFER) return HRESULT with Import,Convention=>stdcall,external_name=>"D3DXPreprocessShaderFromFileA";
function D3DXPreprocessShaderFromFileW(pSrcFile:LPCWSTR;pDefines:access constant D3DXMACRO;pInclude:LPD3DXINCLUDE;ppShaderText:LPLPD3DXBUFFER;ppErrorMsgs:LPLPD3DXBUFFER) return HRESULT with Import,Convention=>stdcall,external_name=>"D3DXPreprocessShaderFromFileW";
function D3DXPreprocessShaderFromResourceA(hSrcModule:HMODULE;pSrcResource:LPCSTR;pDefines:access constant D3DXMACRO;pInclude:LPD3DXINCLUDE;ppShaderText:LPLPD3DXBUFFER;ppErrorMsgs:LPLPD3DXBUFFER) return HRESULT with Import,Convention=>stdcall,external_name=>"D3DXPreprocessShaderFromResourceA";
function D3DXPreprocessShaderFromResource(hSrcModule:HMODULE;pSrcResource:LPCSTR;pDefines:access constant D3DXMACRO;pInclude:LPD3DXINCLUDE;ppShaderText:LPLPD3DXBUFFER;ppErrorMsgs:LPLPD3DXBUFFER) return HRESULT with Import,Convention=>stdcall,external_name=>"D3DXPreprocessShaderFromResourceA";
function D3DXPreprocessShaderFromResourceW(hSrcModule:HMODULE;pSrcResource:LPCWSTR;pDefines:access constant D3DXMACRO;pInclude:LPD3DXINCLUDE;ppShaderText:LPLPD3DXBUFFER;ppErrorMsgs:LPLPD3DXBUFFER) return HRESULT with Import,Convention=>stdcall,external_name=>"D3DXPreprocessShaderFromResourceW";
function D3DXPreprocessShader(pSrcData:LPCSTR;SrcDataSize:UINT;pDefines:access constant D3DXMACRO;pInclude:LPD3DXINCLUDE;ppShaderText:LPLPD3DXBUFFER;ppErrorMsgs:LPLPD3DXBUFFER) return HRESULT with Import,Convention=>stdcall,external_name=>"D3DXPreprocessShader";
type tagD3DXSHADER_CONSTANTTABLE is record
Size :dword;
Creator :dword;
Version :dword;
Constants :dword;
ConstantInfo :dword;
Flags :dword;
Target :dword;
end record;
subtype D3DXSHADER_CONSTANTTABLE is tagD3DXSHADER_CONSTANTTABLE;
type LPD3DXSHADER_CONSTANTTABLE is access all D3DXSHADER_CONSTANTTABLE;
type tagD3DXSHADER_CONSTANTINFO is record
Name:dword;
RegisterSet:word;
RegisterIndex:word;
RegisterCount:word;
Reserved:word;
TypeInfo:dword;
DefaultValue:dword;
end record;
subtype D3DXSHADER_CONSTANTINFO is tagD3DXSHADER_CONSTANTINFO;
type LPD3DXSHADER_CONSTANTINFO is access all D3DXSHADER_CONSTANTINFO;
type tagD3DXSHADER_TYPEINFO is record
Class:word;
Typ:word;
Rows:word;
Columns:word;
Elements:word;
StructMembers:word;
StructMemberInfo:dword;
end record;
subtype D3DXSHADER_TYPEINFO is tagD3DXSHADER_TYPEINFO;
type LPD3DXSHADER_TYPEINFO is access all D3DXSHADER_TYPEINFO;
type tagD3DXSHADER_STRUCTMEMBERINFO is record
Name:dword;
TypeInfo:dword;
end record;
subtype D3DXSHADER_STRUCTMEMBERINFO is tagD3DXSHADER_STRUCTMEMBERINFO;
type LPD3DXSHADER_STRUCTMEMBERINFO is access all D3DXSHADER_STRUCTMEMBERINFO;
--
-- THE END
--
end d3dx9shader;