----------------------------------------
-- File : D3Dcompiler.ads --
-- Translator:Dongfeng.Gu,2018/10/26 --
-- Mail: [email protected] --
-- Progress:100% --
----------------------------------------
with Ada.Characters.Handling; use Ada.Characters.Handling;
with win32; use win32;
with win32.winnt; use win32.winnt;
with win32.windef; use win32.windef;
with win32.rpcdce; use win32.rpcdce;
with win32.Objbase; use win32.Objbase;
with D3D10shader; use D3D10shader;
with d3dcommon; use d3dcommon;
with d3d10misc; use d3d10misc;
with D3D10effect; use D3D10effect;
package D3Dcompiler is
D3DCOMPILER_DLL_W : constant Wide_String:= TO_WIDE_STRING("d3dcompiler_42.dll");
D3DCOMPILER_DLL_A : constant String:= "d3dcompiler_42.dll";
D3DCOMPILER_DLL : constant String:= D3DCOMPILER_DLL_A;
subtype D3D_SHADER_MACRO is tagD3D10_SHADER_MACRO;
type LPCD3D_SHADER_MACRO is access constant D3D_SHADER_MACRO;
subtype D3D_INCLUDE_TYPE is tagD3D10_INCLUDE_TYPE;
subtype ID3DBlob is ID3D10Blob;
type LPD3DBlob is access all ID3DBlob;
type LPLPD3DBlob is access all LPD3DBlob;
subtype D3DINCLUDE is ID3D10Include;
type LPD3DINCLUDE is access all D3DINCLUDE;
function D3DCompile(pSrcData:LPCVOID;SrcDataSize:SIZE_T;pSourceName:LPCSTR;pDefines:LPCD3D_SHADER_MACRO;pInclude:LPD3DINCLUDE;pEntrypoint:LPCSTR;pTarget:LPCSTR;Flags1:UINT;Flags2:UINT;ppCode:LPLPD3DBLOB;ppErrorMsgs:LPLPD3DBLOB) return HRESULT with Import,Convention=>stdcall,external_name=>"D3DCompile";
type pD3DCompile is access function(pSrcData:LPCVOID;SrcDataSize:SIZE_T;pFileName:LPCSTR;pDefines:LPD3D10_SHADER_MACRO;pInclude:LPD3D10INCLUDE;pEntrypoint:LPCSTR;pTarget:LPCSTR;Flags1:UINT;Flags2:UINT;ppCode:LPLPD3D10BLOB;ppErrorMsgs:LPLPD3D10BLOB) return HRESULT with Convention=>Stdcall;
function D3DPreprocess(pSrcData:LPCVOID;SrcDataSize:SIZE_T;pSourceName:LPCSTR;pDefines:LPCD3D_SHADER_MACRO;pInclude:LPD3DINCLUDE;ppCodeText:LPLPD3DBLOB;ppErrorMsgs:LPLPD3DBLOB) return HRESULT with Import,Convention=>stdcall,external_name=>"D3DPreprocess";
type pD3DPreprocess is access function(pSrcData:LPCVOID;SrcDataSize:SIZE_T;pFileName:LPCSTR;pDefines:LPD3D10_SHADER_MACRO;pInclude:LPD3D10INCLUDE;ppCodeText:LPLPD3D10BLOB;ppErrorMsgs:LPLPD3D10BLOB) return HRESULT with Convention=>Stdcall;
function D3DGetDebugInfo(pSrcData:LPCVOID;SrcDataSize:SIZE_T;ppDebugInfo:LPLPD3DBLOB) return HRESULT with Import,Convention=>stdcall,external_name=>"D3DGetDebugInfo";
function D3DReflect(pSrcData:LPCVOID;SrcDataSize:SIZE_T;pInterface:REFIID;ppReflector:LPLPvoid) return HRESULT with Import,Convention=>stdcall,external_name=>"D3DReflect";
D3D_DISASM_ENABLE_COLOR_CODE : constant := 16#00000001#;
D3D_DISASM_ENABLE_DEFAULT_VALUE_PRINTS : constant := 16#00000002#;
D3D_DISASM_ENABLE_INSTRUCTION_NUMBERING : constant := 16#00000004#;
D3D_DISASM_ENABLE_INSTRUCTION_CYCLE : constant := 16#00000008#;
function D3DDisassemble(pSrcData:LPCVOID;SrcDataSize:SIZE_T;Flags:UINT;szComments:LPCSTR;ppDisassembly:LPLPD3DBLOB) return HRESULT with Import,Convention=>stdcall,external_name=>"D3DDisassemble";
type pD3DDisassemble is access function(pSrcData:LPCVOID;SrcDataSize:SIZE_T;Flags:UINT;szComments:LPCSTR;ppDisassembly:LPLPD3DBLOB) return HRESULT with Convention=>Stdcall;
function D3DDisassemble10Effect(pEffect:LPID3D10Effect;Flags:UINT;ppDisassembly:LPLPD3DBLOB) return HRESULT with Import,Convention=>stdcall,external_name=>"D3DDisassemble10Effect";
function D3DGetInputSignatureBlob(pSrcData:LPCVOID;SrcDataSize:SIZE_T;ppSignatureBlob:LPLPD3DBLOB) return HRESULT with Import,Convention=>stdcall,external_name=>"D3DGetInputSignatureBlob";
function D3DGetOutputSignatureBlob(pSrcData:LPCVOID;SrcDataSize:SIZE_T;ppSignatureBlob:LPLPD3DBLOB) return HRESULT with Import,Convention=>stdcall,external_name=>"D3DGetOutputSignatureBlob";
function D3DGetInputAndOutputSignatureBlob(pSrcData:LPCVOID;SrcDataSize:SIZE_T;ppSignatureBlob:LPLPD3DBLOB) return HRESULT with Import,Convention=>stdcall,external_name=>"D3DGetInputAndOutputSignatureBlob";
type D3DCOMPILER_STRIP_FLAGS is (D3DCOMPILER_STRIP_REFLECTION_DATA,
D3DCOMPILER_STRIP_DEBUG_INFO,
D3DCOMPILER_STRIP_TEST_BLOBS,
D3DCOMPILER_STRIP_FORCE_DWORD);
for D3DCOMPILER_STRIP_FLAGS use (D3DCOMPILER_STRIP_REFLECTION_DATA=>1,
D3DCOMPILER_STRIP_DEBUG_INFO=>2,
D3DCOMPILER_STRIP_TEST_BLOBS=>4,
D3DCOMPILER_STRIP_FORCE_DWORD=>16#7fffffff#);
type LPD3DCOMPILER_STRIP_FLAGS is access D3DCOMPILER_STRIP_FLAGS;
function D3DStripShader(pShaderBytecode:LPCVOID;BytecodeLength:SIZE_T;uStripFlags:UINT;ppStrippedBlob:LPLPD3DBLOB) return HRESULT with Import,Convention=>stdcall,external_name=>"D3DStripShader";
pragma Linker_Options("c:\windows\system32\"&"d3dcompiler_42.dll");
--
-- THE END.
--
end D3Dcompiler;
Ada计算机图形DirectX之D3Dcompiler
猜你喜欢
转载自blog.csdn.net/adacore/article/details/83410242
今日推荐
周排行