Ada计算机图形DirectX之D3D10_1

本文深入解析了Direct3D 10.1 API的特性,包括各种常量定义、数据类型、接口描述以及设备功能,如混合目标渲染、资源视图创建和设备状态管理等。文章详细介绍了D3D10_1特征级别、渲染目标混合描述、资源视图描述、设备接口和创建方法。
摘要由CSDN通过智能技术生成
----------------------------------------
-- File : d3d10_1.ads                 --
-- Translator:Dongfeng.Gu,2018/10/21  --
-- Mail: 515639@qq.com                --
-- Progress:100%                      --
----------------------------------------

with win32;                  use win32;
with win32.winnt;            use win32.winnt;
with win32.rpcdce;           use win32.rpcdce;
with win32.windef;           use win32.windef;
with Win32.objbase;          use win32.objbase;

with d3d10;                  use d3d10;
with d3d10misc;              use d3d10misc;
with DXGI;                   use DXGI;
with DXGIFormat;             use DXGIFormat;

package D3D10_1 is

   subtype FLOAT_ARRAY_0_TO_3 is float_Array(0..3);

   REQUIRED_RPCNDR_H_VERSION : constant := 475;

   REQUIRED_RPCSAL_H_VERSION : constant := 100;

   D3D10_1_DEFAULT_SAMPLE_MASK : constant := ( 16#ffffffff# );

   D3D10_1_FLOAT16_FUSED_TOLERANCE_IN_ULP : constant := ( 0.6 );

   D3D10_1_FLOAT32_TO_INTEGER_TOLERANCE_IN_ULP : constant := ( 0.6 );

   D3D10_1_GS_INPUT_REGISTER_COUNT : constant := ( 32 );

   D3D10_1_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT : constant := ( 32 );

   D3D10_1_IA_VERTEX_INPUT_STRUCTURE_ELEMENTS_COMPONENTS : constant := ( 128 );

   D3D10_1_IA_VERTEX_INPUT_STRUCTURE_ELEMENT_COUNT : constant := ( 32 );

   D3D10_1_PS_OUTPUT_MASK_REGISTER_COMPONENTS : constant := ( 1 );

   D3D10_1_PS_OUTPUT_MASK_REGISTER_COMPONENT_BIT_COUNT : constant := ( 32 );

   D3D10_1_PS_OUTPUT_MASK_REGISTER_COUNT : constant := ( 1 );

   D3D10_1_SHADER_MAJOR_VERSION : constant := ( 4 );

   D3D10_1_SHADER_MINOR_VERSION : constant := ( 1 );

   D3D10_1_SO_BUFFER_MAX_STRIDE_IN_BYTES : constant := ( 2048 );

   D3D10_1_SO_BUFFER_MAX_WRITE_WINDOW_IN_BYTES : constant := ( 256 );

   D3D10_1_SO_BUFFER_SLOT_COUNT : constant := ( 4 );

   D3D10_1_SO_MULTIPLE_BUFFER_ELEMENTS_PER_BUFFER : constant := ( 1 );

   D3D10_1_SO_SINGLE_BUFFER_COMPONENT_LIMIT : constant := ( 64 );

   D3D10_1_STANDARD_VERTEX_ELEMENT_COUNT : constant := ( 32 );

   D3D10_1_SUBPIXEL_FRACTIONAL_BIT_COUNT : constant := ( 8 );

   D3D10_1_VS_INPUT_REGISTER_COUNT : constant := ( 32 );

   D3D10_1_VS_OUTPUT_REGISTER_COUNT : constant := ( 32 );

   type D3D10_FEATURE_LEVEL1 is (
                                 D3D10_FEATURE_LEVEL_9_1,
                                 D3D10_FEATURE_LEVEL_9_2,
                                 D3D10_FEATURE_LEVEL_9_3,
                                 D3D10_FEATURE_LEVEL_10_0,
                                 D3D10_FEATURE_LEVEL_10_1
                                );
   for D3D10_FEATURE_LEVEL1 use (
                                 D3D10_FEATURE_LEVEL_9_1=>16#9100#,
                                 D3D10_FEATURE_LEVEL_9_2=>16#9200#,
                                 D3D10_FEATURE_LEVEL_9_3=>16#9300#,
                                 D3D10_FEATURE_LEVEL_10_0=>16#a000#,
                                 D3D10_FEATURE_LEVEL_10_1=>16#a100#
                                );

   type LPD3D10_FEATURE_LEVEL1 is access D3D10_FEATURE_LEVEL1;

   type D3D10_RENDER_TARGET_BLEND_DESC1 is record
      BlendEnable:BOOL;
      SrcBlend:D3D10_BLEND;
      DestBlend:D3D10_BLEND;
      BlendOp:D3D10_BLEND_OP;
      SrcBlendAlpha:D3D10_BLEND;
      DestBlendAlpha:D3D10_BLEND;
      BlendOpAlpha:D3D10_BLEND_OP;
      RenderTargetWriteMask:UINT8;
   end record;

   type LPD3D10_RENDER_TARGET_BLEND_DESC1 is access all D3D10_RENDER_TARGET_BLEND_DESC1;
   type D3D10_RENDER_TARGET_BLEND_DESC1_ARRAY is array (Natural range<>) of D3D10_RENDER_TARGET_BLEND_DESC1;

   type D3D10_BLEND_DESC1 is record
      AlphaToCoverageEnable:BOOL;
      IndependentBlendEnable:BOOL;
      RenderTarget:D3D10_RENDER_TARGET_BLEND_DESC1_Array(0.. 8 -1);
   end record;

   type LPD3D10_BLEND_DESC1 is access all D3D10_BLEND_DESC1;
   type LPCD3D10_BLEND_DESC1 is access constant D3D10_BLEND_DESC1;

   type ID3D10BlendState1;
   type LPID3D10BlendState1 is access all ID3D10BlendState1;
   type LPLPID3D10BlendState1 is access all LPID3D10BlendState1;
   subtype LPD3D10BlendState1 is LPID3D10BlendState1;
   subtype LPLPD3D10BlendState1 is LPLPID3D10BlendState1;

   type ID3D10BlendState1 is record
      QueryInterface:access function(This:LPID3D10BlendState1;riid:REFIID;ppvObject:LPLPvoid) return HRESULT with Convention=>Stdcall;
      AddRef:access function(This:LPID3D10BlendState1) return ULONG with Convention=>Stdcall;
      Release:access function(This:LPID3D10BlendState1) return ULONG with Convention=>Stdcall;
      GetDevice:access function(This:LPID3D10BlendState1;ppDevice:LPLPID3D10Device) return void with Convention=>Stdcall;
      GetPrivateData:access function(This:LPID3D10BlendState1;guid:REFGUID;pDataSize:LPUINT;pData:LPvoid) return HRESULT with Convention=>Stdcall;
      SetPrivateData:access function(This:LPID3D10BlendState1;guid:REFGUID;DataSize:UINT;pData:LPCvoid) return HRESULT with Convention=>Stdcall;
      SetPrivateDataInterface:access function(This:LPID3D10BlendState1;guid:REFGUID;pData:access constant IUnknown) return HRESULT with Convention=>Stdcall;
      GetDesc:access function(This:LPID3D10BlendState1;pDesc:LPD3D10_BLEND_DESC) return void with Convention=>Stdcall;
      GetDesc1:access function(This:LPID3D10BlendState1;pDesc:LPD3D10_BLEND_DESC1) return void with Convention=>Stdcall;
   end record;

   type D3D10_TEXCUBE_ARRAY_SRV1 is record
      MostDetailedMip:UINT;
      MipLevels:UINT;
      First2DArrayFace:UINT;
      NumCubes:UINT;
   end record;

   type LPD3D10_TEXCUBE_ARRAY_SRV1 is access all D3D10_TEXCUBE_ARRAY_SRV1;

   type D3D10_SRV_DIMENSION1 is (D3D10_1_SRV_DIMENSION_UNKNOWN,
                                 D3D10_1_SRV_DIMENSION_BUFFER,
                                 D3D10_1_SRV_DIMENSION_TEXTURE1D,
                                 D3D10_1_SRV_DIMENSION_TEXTURE1DARRAY,
                                 D3D10_1_SRV_DIMENSION_TEXTURE2D,
                                 D3D10_1_SRV_DIMENSION_TEXTURE2DARRAY,
                                 D3D10_1_SRV_DIMENSION_TEXTURE2DMS,
                                 D3D10_1_SRV_DIMENSION_TEXTURE2DMSARRAY,
                                 D3D10_1_SRV_DIMENSION_TEXTURE3D,
                                 D3D10_1_SRV_DIMENSION_TEXTURECUBE,
                                 D3D10_1_SRV_DIMENSION_TEXTURECUBEARRAY);
   for D3D10_SRV_DIMENSION1 use (D3D10_1_SRV_DIMENSION_UNKNOWN=>0,
                                 D3D10_1_SRV_DIMENSION_BUFFER=>1,
                                 D3D10_1_SRV_DIMENSION_TEXTURE1D=>2,
                                 D3D10_1_SRV_DIMENSION_TEXTURE1DARRAY=>3,
                                 D3D10_1_SRV_DIMENSION_TEXTURE2D=>4,
                                 D3D10_1_SRV_DIMENSION_TEXTURE2DARRAY=>5,
                                 D3D10_1_SRV_DIMENSION_TEXTURE2DMS=>6,
                                 D3D10_1_SRV_DIMENSION_TEXTURE2DMSARRAY=>7,
                                 D3D10_1_SRV_DIMENSION_TEXTURE3D=>8,
                                 D3D10_1_SRV_DIMENSION_TEXTURECUBE=>9,
                                 D3D10_1_SRV_DIMENSION_TEXTURECUBEARRAY=>10);

   type LPD3D10_SRV_DIMENSION1 is access D3D10_SRV_DIMENSION1;

   type D3D10_SHADER_RESOURCE_VIEW_DESC1(i:Integer:=0) is record
      Format:DXGI_FORMAT;
      ViewDimension:D3D10_SRV_DIMENSION1;
      case i is
         when 0=>
            Buffer:D3D10_BUFFER_SRV;
         when 1=>
            Texture1D:D3D10_TEX1D_SRV;
         when 2=>
           Texture1DArray:D3D10_TEX1D_ARRAY_SRV;
         when 3=>
            Texture2D:D3D10_TEX2D_SRV;
         when 4=>
            Texture2DArray:D3D10_TEX2D_ARRAY_SRV;
         when 5=>
            Texture2DMS:D3D10_TEX2DMS_SRV;
         when 6=>
            Texture2DMSArray:D3D10_TEX2DMS_ARRAY_SRV;
         when 7=>
            Texture3D:D3D10_TEX3D_SRV;
         when 8=>
            TextureCube:D3D10_TEXCUBE_SRV;
         when 9=>
            TextureCubeArray:D3D10_TEXCUBE_ARRAY_SRV1;
         when others=>
            null;
      end case;
   end record with Unchecked_Union;
   type LPD3D10_SHADER_RESOURCE_VIEW_DESC1 is access all D3D10_SHADER_RESOURCE_VIEW_DESC1;
   type LPCD3D10_SHADER_RESOURCE_VIEW_DESC1 is access constant D3D10_SHADER_RESOURCE_VIEW_DESC1;

   type ID3D10ShaderResourceView1;
   type LPID3D10ShaderResourceView1 is access all ID3D10ShaderResourceView1;
   type LPLPID3D10ShaderResourceView1 is access all LPID3D10ShaderResourceView1;
   subtype LPD3D10ShaderResourceView1 is LPID3D10ShaderResourceView1;
   subtype LPLPD3D10ShaderResourceView1 is LPLPID3D10ShaderResourceView1;

   type ID3D10ShaderResourceView1 is record
      QueryInterface:access function(This:LPID3D10ShaderResourceView1;riid:REFIID;ppvObject:LPLPvoid) return HRESULT with Convention=>Stdcall;
      AddRef:access function(This:LPID3D10ShaderResourceView1) return ULONG with Convention=>Stdcall;
      Release:access function(This:LPID3D10ShaderResourceView1) return ULONG with Convention=>Stdcall;
      GetDevice:access function(This:LPID3D10ShaderResourceView1;ppDevice:LPLPID3D10Device) return void with Convention=>Stdcall;
      GetPrivateData:access function(This:LPID3D10ShaderResourceView1;guid:REFGUID;pDataSize:LPUINT;pData:LPvoid) return HRESULT with Convention=>Stdcall;
      SetPrivateData:access function(This:LPID3D10ShaderResourceView1;guid:REFGUID;DataSize:UINT;pData:LPCvoid) return HRESULT with Convention=>Stdcall;
      SetPrivateDataInterface:access function(This:LPID3D10ShaderResourceView1;guid:REFGUID;pData:access constant IUnknown) return HRESULT with Convention=>Stdcall;
      GetResource:access function(This:LPID3D10ShaderResourceView1;ppResource:LPLPID3D10Resource) return void with Convention=>Stdcall;
      GetDesc:access function(This:LPID3D10ShaderResourceView1;pDesc:LPD3D10_SHADER_RESOURCE_VIEW_DESC) return void with Convention=>Stdcall;
      GetDesc1:access function(This:LPID3D10ShaderResourceView1;pDesc:LPD3D10_SHADER_RESOURCE_VIEW_DESC1) return void with Convention=>Stdcall;
   end record;

   type D3D10_STANDARD_MULTISAMPLE_QUALITY_LEVELS is (
                                                      D3D10_CENTER_MULTISAMPLE_PATTERN,
                                                      D3D10_STANDARD_MULTISAMPLE_PATTERN
                                                      );
   for D3D10_STANDARD_MULTISAMPLE_QUALITY_LEVELS use (
                                                      D3D10_CENTER_MULTISAMPLE_PATTERN=>16#fffffffe#,
                                                      D3D10_STANDARD_MULTISAMPLE_PATTERN=>16#ffffffff#
                                                      );

   type LPD3D10_STANDARD_MULTISAMPLE_QUALITY_LEVELS is access D3D10_STANDARD_MULTISAMPLE_QUALITY_LEVELS;


   type ID3D10Device1;
   type LPID3D10Device1 is access all ID3D10Device1;
   type LPLPID3D10Device1 is access all LPID3D10Device1;
   subtype LPD3D10Device1 is LPID3D10Device1;
   subtype LPLPD3D10Device1 is LPLPID3D10Device1;

   type ID3D10Device1 is record
      QueryInterface:access function(This:LPID3D10Device1;riid:REFIID;ppvObject:LPLPvoid) return HRESULT with Convention=>Stdcall;
      AddRef:access function(This:LPID3D10Device1) return ULONG with Convention=>Stdcall;
      Release:access function(This:LPID3D10Device1) return ULONG with Convention=>Stdcall;
      VSSetConstantBuffers:access function(This:LPID3D10Device1;StartSlot:UINT;NumBuffers:UINT;ppConstantBuffers:LPLPID3D10Buffer) return void with Convention=>Stdcall;
      PSSetShaderResources:access function(This:LPID3D10Device1;StartSlot:UINT;NumViews:UINT;ppShaderResourceViews:LPLPID3D10ShaderResourceView) return void with Convention=>Stdcall;
      PSSetShader:access function(This:LPID3D10Device1;pPixelShader:LPID3D10PixelShader) return void with Convention=>Stdcall;
      PSSetSamplers:access function(This:LPID3D10Device1;StartSlot:UINT;NumSamplers:UINT;ppSamplers:LPLPID3D10SamplerState) return void with Convention=>Stdcall;
      VSSetShader:access function(This:LPID3D10Device1;pVertexShader:LPID3D10VertexShader) return void with Convention=>Stdcall;
      DrawIndexed:access function(This:LPID3D10Device1;IndexCount:UINT;StartIndexLocation:UINT;BaseVertexLocation:INT) return void with Convention=>Stdcall;
      Draw:access function(This:LPID3D10Device1;VertexCount:UINT;StartVertexLocation:UINT) return void with Convention=>Stdcall;
      PSSetConstantBuffers:access function(This:LPID3D10Device1;StartSlot:UINT;NumBuffers:UINT;ppConstantBuffers:LPLPID3D10Buffer) return void with Convention=>Stdcall;
      IASetInputLayout:access function(This:LPID3D10Device1;pInputLayout:LPID3D10InputLayout) return void with Convention=>Stdcall;
      IASetVertexBuffers:access function(This:LPID3D10Device1;StartSlot:UINT;NumBuffers:UINT;ppVertexBuffers:LPLPID3D10Buffer;pStrides:LPCUINT;pOffsets:LPCUINT) return void with Convention=>Stdcall;
      IASetIndexBuffer:access function(This:LPID3D10Device1;pIndexBuffer:LPID3D10Buffer;Format:DXGI_FORMAT;Offset:UINT) return void with Convention=>Stdcall;
      DrawIndexedInstanced:access function(This:LPID3D10Device1;IndexCountPerInstance:UINT;InstanceCount:UINT;StartIndexLocation:UINT;BaseVertexLocation:INT;StartInstanceLocation:UINT) return void with Convention=>Stdcall;
      DrawInstanced:access function(This:LPID3D10Device1;VertexCountPerInstance:UINT;InstanceCount:UINT;StartVertexLocation:UINT;StartInstanceLocation:UINT) return void with Convention=>Stdcall;
      GSSetConstantBuffers:access function(This:LPID3D10Device1;StartSlot:UINT;NumBuffers:UINT;ppConstantBuffers:LPLPID3D10Buffer) return void with Convention=>Stdcall;
      GSSetShader:access function(This:LPID3D10Device1;pShader:LPID3D10GeometryShader) return void with Convention=>Stdcall;
      IASetPrimitiveTopology:access function(This:LPID3D10Device1;Topology:D3D10_PRIMITIVE_TOPOLOGY) return void with Convention=>Stdcall;
      VSSetShaderResources:access function(This:LPID3D10Device1;StartSlot:UINT;NumViews:UINT;ppShaderResourceViews:LPLPID3D10ShaderResourceView) return void with Convention=>Stdcall;
      VSSetSamplers:access function(This:LPID3D10Device1;StartSlot:UINT;NumSamplers:UINT;ppSamplers:LPLPID3D10SamplerState) return void with Convention=>Stdcall;
      SetPredication:access function(This:LPID3D10Device1;pPredicate:LPID3D10Predicate;PredicateValue:BOOL) return void with Convention=>Stdcall;
      GSSetShaderResources:access function(This:LPID3D10Device1;StartSlot:UINT;NumViews:UINT;ppShaderResourceViews:LPLPID3D10ShaderResourceView) return void with Convention=>Stdcall;
      GSSetSamplers:access function(This:LPID3D10Device1;StartSlot:UINT;NumSamplers:UINT;ppSamplers:LPLPID3D10SamplerState) return void with Convention=>Stdcall;
      OMSetRenderTargets:access function(This:LPID3D10Device1;NumViews:UINT;ppRenderTargetViews:LPLPID3D10RenderTargetView;pDepthStencilView:LPID3D10DepthStencilView) return void with Convention=>Stdcall;
      OMSetBlendState:access function(This:LPID3D10Device1;pBlendState:LPID3D10BlendState;BlendFactor:FLOAT_ARRAY_0_TO_3;SampleMask:UINT) return void with Convention=>Stdcall;
      OMSetDepthStencilState:access function(This:LPID3D10Device1;pDepthStencilState:LPID3D10DepthStencilState;StencilRef:UINT) return void with Convention=>Stdcall;
      SOSetTargets:access function(This:LPID3D10Device1;NumBuffers:UINT;ppSOTargets:LPLPID3D10Buffer;pOffsets:LPCUINT) return void with Convention=>Stdcall;
      DrawAuto:access function(This:LPID3D10Device1) return void with Convention=>Stdcall;
      RSSetState:access function(This:LPID3D10Device1;pRasterizerState:LPID3D10RasterizerState) return void with Convention=>Stdcall;
      RSSetViewports:access function(This:LPID3D10Device1;NumViewports:UINT;pViewports:LPCD3D10_VIEWPORT) return void with Convention=>Stdcall;
      RSSetScissorRects:access function(This:LPID3D10Device1;NumRects:UINT;pRects:LPCD3D10_RECT) return void with Convention=>Stdcall;
      CopySubresourceRegion:access function(This:LPID3D10Device1;pDstResource:LPID3D10Resource;DstSubresource:UINT;DstX:UINT;DstY:UINT;DstZ:UINT;pSrcResource:LPID3D10Resource;SrcSubresource:UINT;pSrcBox:LPCD3D10_BOX) return void with Convention=>Stdcall;
      CopyResource:access function(This:LPID3D10Device1;pDstResource:LPID3D10Resource;pSrcResource:LPID3D10Resource) return void with Convention=>Stdcall;
      UpdateSubresource:access function(This:LPID3D10Device1;pDstResource:LPID3D10Resource;DstSubresource:UINT;pDstBox:LPCD3D10_BOX;pSrcData:LPCvoid;SrcRowPitch:UINT;SrcDepthPitch:UINT) return void with Convention=>Stdcall;
      ClearRenderTargetView:access function(This:LPID3D10Device1;pRenderTargetView:LPID3D10RenderTargetView;ColorRGBA:FLOAT_ARRAY_0_TO_3) return void with Convention=>Stdcall;
      ClearDepthStencilView:access function(This:LPID3D10Device1;pDepthStencilView:LPID3D10DepthStencilView;ClearFlags:UINT;Depth:FLOAT;Stencil:UINT8) return void with Convention=>Stdcall;
      GenerateMips:access function(This:LPID3D10Device1;pShaderResourceView:LPID3D10ShaderResourceView) return void with Convention=>Stdcall;
      ResolveSubresource:access function(This:LPID3D10Device1;pDstResource:LPID3D10Resource;DstSubresource:UINT;pSrcResource:LPID3D10Resource;SrcSubresource:UINT;Format:DXGI_FORMAT) return void with Convention=>Stdcall;
      VSGetConstantBuffers:access function(This:LPID3D10Device1;StartSlot:UINT;NumBuffers:UINT;ppConstantBuffers:LPLPID3D10Buffer) return void with Convention=>Stdcall;
      PSGetShaderResources:access function(This:LPID3D10Device1;StartSlot:UINT;NumViews:UINT;ppShaderResourceViews:LPLPID3D10ShaderResourceView) return void with Convention=>Stdcall;
      PSGetShader:access function(This:LPID3D10Device1;ppPixelShader:LPLPID3D10PixelShader) return void with Convention=>Stdcall;
      PSGetSamplers:access function(This:LPID3D10Device1;StartSlot:UINT;NumSamplers:UINT;ppSamplers:LPLPID3D10SamplerState) return void with Convention=>Stdcall;
      VSGetShader:access function(This:LPID3D10Device1;ppVertexShader:LPLPID3D10VertexShader) return void with Convention=>Stdcall;
      PSGetConstantBuffers:access function(This:LPID3D10Device1;StartSlot:UINT;NumBuffers:UINT;ppConstantBuffers:LPLPID3D10Buffer) return void with Convention=>Stdcall;
      IAGetInputLayout:access function(This:LPID3D10Device1;ppInputLayout:LPLPID3D10InputLayout) return void with Convention=>Stdcall;
      IAGetVertexBuffers:access function(This:LPID3D10Device1;StartSlot:UINT;NumBuffers:UINT;ppVertexBuffers:LPLPID3D10Buffer;pStrides:LPUINT;pOffsets:LPUINT) return void with Convention=>Stdcall;
      IAGetIndexBuffer:access function(This:LPID3D10Device1;pIndexBuffer:LPLPID3D10Buffer;Format:LPDXGI_FORMAT;Offset:LPUINT) return void with Convention=>Stdcall;
      GSGetConstantBuffers:access function(This:LPID3D10Device1;StartSlot:UINT;NumBuffers:UINT;ppConstantBuffers:LPLPID3D10Buffer) return void with Convention=>Stdcall;
      GSGetShader:access function(This:LPID3D10Device1;ppGeometryShader:LPLPID3D10GeometryShader) return void with Convention=>Stdcall;
      IAGetPrimitiveTopology:access function(This:LPID3D10Device1;pTopology:LPD3D10_PRIMITIVE_TOPOLOGY) return void with Convention=>Stdcall;
      VSGetShaderResources:access function(This:LPID3D10Device1;StartSlot:UINT;NumViews:UINT;ppShaderResourceViews:LPLPID3D10ShaderResourceView) return void with Convention=>Stdcall;
      VSGetSamplers:access function(This:LPID3D10Device1;StartSlot:UINT;NumSamplers:UINT;ppSamplers:LPLPID3D10SamplerState) return void with Convention=>Stdcall;
      GetPredication:access function(This:LPID3D10Device1;ppPredicate:LPLPID3D10Predicate;pPredicateValue:LPBOOL) return void with Convention=>Stdcall;
      GSGetShaderResources:access function(This:LPID3D10Device1;StartSlot:UINT;NumViews:UINT;ppShaderResourceViews:LPLPID3D10ShaderResourceView) return void with Convention=>Stdcall;
      GSGetSamplers:access function(This:LPID3D10Device1;StartSlot:UINT;NumSamplers:UINT;ppSamplers:LPLPID3D10SamplerState) return void with Convention=>Stdcall;
      OMGetRenderTargets:access function(This:LPID3D10Device1;NumViews:UINT;ppRenderTargetViews:LPLPID3D10RenderTargetView;ppDepthStencilView:LPLPID3D10DepthStencilView) return void with Convention=>Stdcall;
      OMGetBlendState:access function(This:LPID3D10Device1;ppBlendState:LPLPID3D10BlendState;BlendFactor:FLOAT_ARRAY_0_TO_3;pSampleMask:LPUINT) return void with Convention=>Stdcall;
      OMGetDepthStencilState:access function(This:LPID3D10Device1;ppDepthStencilState:LPLPID3D10DepthStencilState;pStencilRef:LPUINT) return void with Convention=>Stdcall;
      SOGetTargets:access function(This:LPID3D10Device1;NumBuffers:UINT;ppSOTargets:LPLPID3D10Buffer;pOffsets:LPUINT) return void with Convention=>Stdcall;
      RSGetState:access function(This:LPID3D10Device1;ppRasterizerState:LPLPID3D10RasterizerState) return void with Convention=>Stdcall;
      RSGetViewports:access function(This:LPID3D10Device1;NumViewports:LPUINT;pViewports:LPD3D10_VIEWPORT) return void with Convention=>Stdcall;
      RSGetScissorRects:access function(This:LPID3D10Device1;NumRects:LPUINT;pRects:LPD3D10_RECT) return void with Convention=>Stdcall;
      GetDeviceRemovedReason:access function(This:LPID3D10Device1) return HRESULT with Convention=>Stdcall;
      SetExceptionMode:access function(This:LPID3D10Device1;RaiseFlags:UINT) return HRESULT with Convention=>Stdcall;
      GetExceptionMode:access function(This:LPID3D10Device1) return UINT with Convention=>Stdcall;
      GetPrivateData:access function(This:LPID3D10Device1;guid:REFGUID;pDataSize:LPUINT;pData:LPvoid) return HRESULT with Convention=>Stdcall;
      SetPrivateData:access function(This:LPID3D10Device1;guid:REFGUID;DataSize:UINT;pData:LPCvoid) return HRESULT with Convention=>Stdcall;
      SetPrivateDataInterface:access function(This:LPID3D10Device1;guid:REFGUID;pData:access constant IUnknown) return HRESULT with Convention=>Stdcall;
      ClearState:access function(This:LPID3D10Device1) return void with Convention=>Stdcall;
      Flush:access function(This:LPID3D10Device1) return void with Convention=>Stdcall;
      CreateBuffer:access function(This:LPID3D10Device1;pDesc:LPCD3D10_BUFFER_DESC;pInitialData:LPCD3D10_SUBRESOURCE_DATA;ppBuffer:LPLPID3D10Buffer) return HRESULT with Convention=>Stdcall;
      CreateTexture1D:access function(This:LPID3D10Device1;pDesc:LPCD3D10_TEXTURE1D_DESC;pInitialData:LPCD3D10_SUBRESOURCE_DATA;ppTexture1D:LPLPID3D10Texture1D) return HRESULT with Convention=>Stdcall;
      CreateTexture2D:access function(This:LPID3D10Device1;pDesc:LPCD3D10_TEXTURE2D_DESC;pInitialData:LPCD3D10_SUBRESOURCE_DATA;ppTexture2D:LPLPID3D10Texture2D) return HRESULT with Convention=>Stdcall;
      CreateTexture3D:access function(This:LPID3D10Device1;pDesc:LPCD3D10_TEXTURE3D_DESC;pInitialData:LPCD3D10_SUBRESOURCE_DATA;ppTexture3D:LPLPID3D10Texture3D) return HRESULT with Convention=>Stdcall;
      CreateShaderResourceView:access function(This:LPID3D10Device1;pResource:LPID3D10Resource;pDesc:LPCD3D10_SHADER_RESOURCE_VIEW_DESC;ppSRView:LPLPID3D10ShaderResourceView) return HRESULT with Convention=>Stdcall;
      CreateRenderTargetView:access function(This:LPID3D10Device1;pResource:LPID3D10Resource;pDesc:LPCD3D10_RENDER_TARGET_VIEW_DESC;ppRTView:LPLPID3D10RenderTargetView) return HRESULT with Convention=>Stdcall;
      CreateDepthStencilView:access function(This:LPID3D10Device1;pResource:LPID3D10Resource;pDesc:LPCD3D10_DEPTH_STENCIL_VIEW_DESC;ppDepthStencilView:LPLPID3D10DepthStencilView) return HRESULT with Convention=>Stdcall;
      CreateInputLayout:access function(This:LPID3D10Device1;pInputElementDescs:LPCD3D10_INPUT_ELEMENT_DESC;NumElements:UINT;pShaderBytecodeWithInputSignature:LPCvoid;BytecodeLength:SIZE_T;ppInputLayout:LPLPID3D10InputLayout) return HRESULT with Convention=>Stdcall;
      CreateVertexShader:access function(This:LPID3D10Device1;pShaderBytecode:LPCvoid;BytecodeLength:SIZE_T;ppVertexShader:LPLPID3D10VertexShader) return HRESULT with Convention=>Stdcall;
      CreateGeometryShader:access function(This:LPID3D10Device1;pShaderBytecode:LPCvoid;BytecodeLength:SIZE_T;ppGeometryShader:LPLPID3D10GeometryShader) return HRESULT with Convention=>Stdcall;
      CreateGeometryShaderWithStreamOutput:access function(This:LPID3D10Device1;pShaderBytecode:LPCvoid;BytecodeLength:SIZE_T;pSODeclaration:LPCD3D10_SO_DECLARATION_ENTRY;NumEntries:UINT;OutputStreamStride:UINT;ppGeometryShader:LPLPID3D10GeometryShader) return HRESULT with Convention=>Stdcall;
      CreatePixelShader:access function(This:LPID3D10Device1;pShaderBytecode:LPCvoid;BytecodeLength:SIZE_T;ppPixelShader:LPLPID3D10PixelShader) return HRESULT with Convention=>Stdcall;
      CreateBlendState:access function(This:LPID3D10Device1;pBlendStateDesc:LPCD3D10_BLEND_DESC;ppBlendState:LPLPID3D10BlendState) return HRESULT with Convention=>Stdcall;
      CreateDepthStencilState:access function(This:LPID3D10Device1;pDepthStencilDesc:LPCD3D10_DEPTH_STENCIL_DESC;ppDepthStencilState:LPLPID3D10DepthStencilState) return HRESULT with Convention=>Stdcall;
      CreateRasterizerState:access function(This:LPID3D10Device1;pRasterizerDesc:LPCD3D10_RASTERIZER_DESC;ppRasterizerState:LPLPID3D10RasterizerState) return HRESULT with Convention=>Stdcall;
      CreateSamplerState:access function(This:LPID3D10Device1;pSamplerDesc:LPCD3D10_SAMPLER_DESC;ppSamplerState:LPLPID3D10SamplerState) return HRESULT with Convention=>Stdcall;
      CreateQuery:access function(This:LPID3D10Device1;pQueryDesc:LPCD3D10_QUERY_DESC;ppQuery:LPLPID3D10Query) return HRESULT with Convention=>Stdcall;
      CreatePredicate:access function(This:LPID3D10Device1;pPredicateDesc:LPCD3D10_QUERY_DESC;ppPredicate:LPLPID3D10Predicate) return HRESULT with Convention=>Stdcall;
      CreateCounter:access function(This:LPID3D10Device1;pCounterDesc:LPCD3D10_COUNTER_DESC;ppCounter:LPLPID3D10Counter) return HRESULT with Convention=>Stdcall;
      CheckFormatSupport:access function(This:LPID3D10Device1;Format:DXGI_FORMAT;pFormatSupport:LPUINT) return HRESULT with Convention=>Stdcall;
      CheckMultisampleQualityLevels:access function(This:LPID3D10Device1;Format:DXGI_FORMAT;SampleCount:UINT;pNumQualityLevels:LPUINT) return HRESULT with Convention=>Stdcall;
      CheckCounterInfo:access function(This:LPID3D10Device1;pCounterInfo:LPD3D10_COUNTER_INFO) return void with Convention=>Stdcall;
      CheckCounter:access function(This:LPID3D10Device1;pDesc:LPCD3D10_COUNTER_DESC;pType:LPD3D10_COUNTER_TYPE;pActiveCounters:LPUINT;szName:LPSTR;pNameLength:LPUINT;szUnits:LPSTR;pUnitsLength:LPUINT;szDescription:LPSTR;pDescriptionLength:LPUINT) return HRESULT with Convention=>Stdcall;
      GetCreationFlags:access function(This:LPID3D10Device1) return UINT with Convention=>Stdcall;
      OpenSharedResource:access function(This:LPID3D10Device1;hResource:HANDLE;ReturnedInterface:REFIID;ppResource:LPLPvoid) return HRESULT with Convention=>Stdcall;
      SetTextFilterSize:access function(This:LPID3D10Device1;Width:UINT;Height:UINT) return void with Convention=>Stdcall;
      GetTextFilterSize:access function(This:LPID3D10Device1;pWidth:LPUINT;pHeight:LPUINT) return void with Convention=>Stdcall;
      CreateShaderResourceView1:access function(This:LPID3D10Device1;pResource:LPID3D10Resource;pDesc:LPCD3D10_SHADER_RESOURCE_VIEW_DESC1;ppSRView:LPLPID3D10ShaderResourceView1) return HRESULT with Convention=>Stdcall;
      CreateBlendState1:access function(This:LPID3D10Device1;pBlendStateDesc:LPCD3D10_BLEND_DESC1;ppBlendState:LPLPID3D10BlendState1) return HRESULT with Convention=>Stdcall;
      GetFeatureLevel:access function(This:LPID3D10Device1) return D3D10_FEATURE_LEVEL1 with Convention=>Stdcall;
   end record;

   D3D10_1_SDK_VERSION : constant := ( ( 0 + 16#20# )  );

   type PFN_D3D10_CREATE_DEVICE1 is access function(pAdapter:LPIDXGIAdapter;DriverType:D3D10_DRIVER_TYPE;Software:HMODULE;Flags:UINT;HardwareLevel:D3D10_FEATURE_LEVEL1;SDKVersion:UINT;ppDevice:LPLPID3D10Device1) return HRESULT with Convention=>Stdcall;

   function D3D10CreateDevice1(pAdapter:LPIDXGIAdapter;DriverType:D3D10_DRIVER_TYPE;Software:HMODULE;Flags:UINT;HardwareLevel:D3D10_FEATURE_LEVEL1;SDKVersion:UINT;ppDevice:LPLPID3D10Device1) return HRESULT with Import,Convention=>stdcall,external_name=>"D3D10CreateDevice1";

   type PFN_D3D10_CREATE_DEVICE_AND_SWAP_CHAIN1 is access function(pAdapter:LPIDXGIAdapter;DriverType:D3D10_DRIVER_TYPE;Software:HMODULE;Flags:UINT;HardwareLevel:D3D10_FEATURE_LEVEL1;SDKVersion:UINT;pSwapChainDesc:LPDXGI_SWAP_CHAIN_DESC;ppSwapChain:LPLPIDXGISwapChain;ppDevice:LPLPID3D10Device1) return HRESULT with Convention=>Stdcall;

   function D3D10CreateDeviceAndSwapChain1(pAdapter:LPIDXGIAdapter;DriverType:D3D10_DRIVER_TYPE;Software:HMODULE;Flags:UINT;HardwareLevel:D3D10_FEATURE_LEVEL1;SDKVersion:UINT;pSwapChainDesc:LPDXGI_SWAP_CHAIN_DESC;ppSwapChain:LPLPIDXGISwapChain;ppDevice:LPLPID3D10Device1) return HRESULT with Import,Convention=>stdcall,external_name=>"D3D10CreateDeviceAndSwapChain1";

   IID_ID3D10BlendState1:constant win32.rpcdce.GUID:=(16#EDAD8D99#,16#8A35#,16#4d6d#,(16#85#,16#66#,16#2E#,16#A2#,16#76#,16#CD#,16#E1#,16#61#));
   IID_ID3D10ShaderResourceView1:constant win32.rpcdce.GUID:=(16#9B7E4C87#,16#342C#,16#4106#,(16#A1#,16#9F#,16#4F#,16#27#,16#04#,16#F6#,16#89#,16#F0#));
   IID_ID3D10Device1:constant win32.rpcdce.GUID:=(16#9B7E4C8F#,16#342C#,16#4106#,(16#A1#,16#9F#,16#4F#,16#27#,16#04#,16#F6#,16#89#,16#F0#));



   --
   -- THE END.
   --





end D3D10_1;

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值