You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

IDirect3DDevice9.d 9.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. import core.sys.windows.windows, core.sys.windows.com;
  2. public import dx9types;
  3. extern (C++) interface IDirect3DDevice9 : IUnknown {
  4. HRESULT TestCooperativeLevel();
  5. UINT GetAvailableTextureMem();
  6. HRESULT EvictManagedResources();
  7. HRESULT GetDirect3D(void** ppD3D9);
  8. HRESULT GetDeviceCaps(void* pCaps);
  9. HRESULT GetDisplayMode(UINT iSwapChain,void* pMode);
  10. HRESULT GetCreationParameters(void* pParameters);
  11. HRESULT SetCursorProperties(UINT XHotSpot,UINT YHotSpot,void* pCursorBitmap);
  12. void SetCursorPosition(int X,int Y,DWORD Flags);
  13. BOOL ShowCursor(BOOL bShow);
  14. HRESULT CreateAdditionalSwapChain(D3DPRESENT_PARAMETERS* pPresentationParameters,void** ppSwapChain);
  15. HRESULT GetSwapChain(UINT iSwapChain,void** ppSwapChain);
  16. UINT GetNumberOfSwapChains();
  17. HRESULT Reset(D3DPRESENT_PARAMETERS* pPresentationParameters);
  18. HRESULT Present(const(RECT)* pSourceRect,const(RECT)* pDestRect,HWND hDestWindowOverride,const(RGNDATA)* pDirtyRegion);
  19. HRESULT GetBackBuffer(UINT iSwapChain,UINT iBackBuffer,uint Type,void** ppBackBuffer);
  20. HRESULT GetRasterStatus(UINT iSwapChain,D3DRASTER_STATUS* pRasterStatus);
  21. HRESULT SetDialogBoxMode(BOOL bEnableDialogs);
  22. void SetGammaRamp(UINT iSwapChain,DWORD Flags,const(D3DGAMMARAMP)* pRamp);
  23. void GetGammaRamp(UINT iSwapChain,D3DGAMMARAMP* pRamp);
  24. HRESULT CreateTexture(UINT Width,UINT Height,UINT Levels,DWORD Usage,uint Format,uint Pool,void** ppTexture,HANDLE* pSharedHandle);
  25. HRESULT CreateVolumeTexture(UINT Width,UINT Height,UINT Depth,UINT Levels,DWORD Usage,uint Format,uint Pool,void** ppVolumeTexture,HANDLE* pSharedHandle);
  26. HRESULT CreateCubeTexture(UINT EdgeLength,UINT Levels,DWORD Usage,uint Format,uint Pool,void** ppCubeTexture,HANDLE* pSharedHandle);
  27. HRESULT CreateVertexBuffer(UINT Length,DWORD Usage,DWORD FVF,uint Pool,void** ppVertexBuffer,HANDLE* pSharedHandle);
  28. HRESULT CreateIndexBuffer(UINT Length,DWORD Usage,uint Format,uint Pool,void** ppIndexBuffer,HANDLE* pSharedHandle);
  29. HRESULT CreateRenderTarget(UINT Width,UINT Height,uint Format,uint MultiSample,DWORD MultisampleQuality,BOOL Lockable,void** ppSurface,HANDLE* pSharedHandle);
  30. HRESULT CreateDepthStencilSurface(UINT Width,UINT Height,uint Format,uint MultiSample,DWORD MultisampleQuality,BOOL Discard,void** ppSurface,HANDLE* pSharedHandle);
  31. HRESULT UpdateSurface(void* pSourceSurface,const(RECT)* pSourceRect,void* pDestinationSurface,const(POINT)* pDestPoint);
  32. HRESULT UpdateTexture(void* pSourceTexture,void* pDestinationTexture);
  33. HRESULT GetRenderTargetData(void* pRenderTarget,void* pDestSurface);
  34. HRESULT GetFrontBufferData(UINT iSwapChain,void* pDestSurface);
  35. HRESULT StretchRect(void* pSourceSurface,const(RECT)* pSourceRect,void* pDestSurface,const(RECT)* pDestRect,uint Filter);
  36. HRESULT ColorFill(void* pSurface,const(RECT)* pRect,uint color);
  37. HRESULT CreateOffscreenPlainSurface(UINT Width,UINT Height,uint Format,uint Pool,void** ppSurface,HANDLE* pSharedHandle);
  38. HRESULT SetRenderTarget(DWORD RenderTargetIndex,void* pRenderTarget);
  39. HRESULT GetRenderTarget(DWORD RenderTargetIndex,void** ppRenderTarget);
  40. HRESULT SetDepthStencilSurface(void* pNewZStencil);
  41. HRESULT GetDepthStencilSurface(void** ppZStencilSurface);
  42. HRESULT BeginScene();
  43. HRESULT EndScene();
  44. HRESULT Clear(DWORD Count,const(LONG[4])* pRects,DWORD Flags,uint Color,float Z,DWORD Stencil);
  45. HRESULT SetTransform(uint State,const(float[4][4])* pMatrix);
  46. HRESULT GetTransform(uint State,float[4][4]* pMatrix);
  47. HRESULT MultiplyTransform(uint,const(float[4][4])*);
  48. HRESULT SetViewport(const(void)* pViewport);
  49. HRESULT GetViewport(void* pViewport);
  50. HRESULT SetMaterial(const(void)* pMaterial);
  51. HRESULT GetMaterial(void* pMaterial);
  52. HRESULT SetLight(DWORD Index,const(void)*);
  53. HRESULT GetLight(DWORD Index,void*);
  54. HRESULT LightEnable(DWORD Index,BOOL Enable);
  55. HRESULT GetLightEnable(DWORD Index,BOOL* pEnable);
  56. HRESULT SetClipPlane(DWORD Index,const(float)* pPlane);
  57. HRESULT GetClipPlane(DWORD Index,float* pPlane);
  58. HRESULT SetRenderState(uint State,DWORD Value);
  59. HRESULT GetRenderState(uint State,DWORD* pValue);
  60. HRESULT CreateStateBlock(uint Type,void** ppSB);
  61. HRESULT BeginStateBlock();
  62. HRESULT EndStateBlock(void** ppSB);
  63. HRESULT SetClipStatus(const(D3DCLIPSTATUS9)* pClipStatus);
  64. HRESULT GetClipStatus(D3DCLIPSTATUS9* pClipStatus);
  65. HRESULT GetTexture(DWORD Stage,void** ppTexture);
  66. HRESULT SetTexture(DWORD Stage,void* pTexture);
  67. HRESULT GetTextureStageState(DWORD Stage,uint Type,DWORD* pValue);
  68. HRESULT SetTextureStageState(DWORD Stage,uint Type,DWORD Value);
  69. HRESULT GetSamplerState(DWORD Sampler,uint Type,DWORD* pValue);
  70. HRESULT SetSamplerState(DWORD Sampler,uint Type,DWORD Value);
  71. HRESULT ValidateDevice(DWORD* pNumPasses);
  72. HRESULT SetPaletteEntries(UINT PaletteNumber,const(PALETTEENTRY)* pEntries);
  73. HRESULT GetPaletteEntries(UINT PaletteNumber,PALETTEENTRY* pEntries);
  74. HRESULT SetCurrentTexturePalette(UINT PaletteNumber);
  75. HRESULT GetCurrentTexturePalette(UINT *PaletteNumber);
  76. HRESULT SetScissorRect(const(RECT)* pRect);
  77. HRESULT GetScissorRect(RECT* pRect);
  78. HRESULT SetSoftwareVertexProcessing(BOOL bSoftware);
  79. BOOL GetSoftwareVertexProcessing();
  80. HRESULT SetNPatchMode(float nSegments);
  81. float GetNPatchMode();
  82. HRESULT DrawPrimitive(uint PrimitiveType,UINT StartVertex,UINT PrimitiveCount);
  83. HRESULT DrawIndexedPrimitive(uint,INT BaseVertexIndex,UINT MinVertexIndex,UINT NumVertices,UINT startIndex,UINT primCount);
  84. HRESULT DrawPrimitiveUP(uint PrimitiveType,UINT PrimitiveCount,const(void)* pVertexStreamZeroData,UINT VertexStreamZeroStride);
  85. HRESULT DrawIndexedPrimitiveUP(uint PrimitiveType,UINT MinVertexIndex,UINT NumVertices,UINT PrimitiveCount,const(void)* pIndexData,uint IndexDataFormat,const(void)* pVertexStreamZeroData,UINT VertexStreamZeroStride);
  86. HRESULT ProcessVertices(UINT SrcStartIndex,UINT DestIndex,UINT VertexCount,void* pDestBuffer,void* pVertexDecl,DWORD Flags);
  87. HRESULT CreateVertexDeclaration(const(D3DVERTEXELEMENT9)* pVertexElements,void** ppDecl);
  88. HRESULT SetVertexDeclaration(void* pDecl);
  89. HRESULT GetVertexDeclaration(void** ppDecl);
  90. HRESULT SetFVF(DWORD FVF);
  91. HRESULT GetFVF(DWORD* pFVF);
  92. HRESULT CreateVertexShader(const(DWORD)* pFunction,void** ppShader);
  93. HRESULT SetVertexShader(void* pShader);
  94. HRESULT GetVertexShader(void** ppShader);
  95. HRESULT SetVertexShaderConstantF(UINT StartRegister,const(float)* pConstantData,UINT Vector4fCount);
  96. HRESULT GetVertexShaderConstantF(UINT StartRegister,float* pConstantData,UINT Vector4fCount);
  97. HRESULT SetVertexShaderConstantI(UINT StartRegister,const(int)* pConstantData,UINT Vector4iCount);
  98. HRESULT GetVertexShaderConstantI(UINT StartRegister,int* pConstantData,UINT Vector4iCount);
  99. HRESULT SetVertexShaderConstantB(UINT StartRegister,const(BOOL)* pConstantData,UINT BoolCount);
  100. HRESULT GetVertexShaderConstantB(UINT StartRegister,BOOL* pConstantData,UINT BoolCount);
  101. HRESULT SetStreamSource(UINT StreamNumber,void* pStreamData,UINT OffsetInBytes,UINT Stride);
  102. HRESULT GetStreamSource(UINT StreamNumber,void** ppStreamData,UINT* pOffsetInBytes,UINT* pStride);
  103. HRESULT SetStreamSourceFreq(UINT StreamNumber,UINT Setting);
  104. HRESULT GetStreamSourceFreq(UINT StreamNumber,UINT* pSetting);
  105. HRESULT SetIndices(void* pIndexData);
  106. HRESULT GetIndices(void** ppIndexData);
  107. HRESULT CreatePixelShader(const(DWORD)* pFunction,void** ppShader);
  108. HRESULT SetPixelShader(void* pShader);
  109. HRESULT GetPixelShader(void** ppShader);
  110. HRESULT SetPixelShaderConstantF(UINT StartRegister,const(float)* pConstantData,UINT Vector4fCount);
  111. HRESULT GetPixelShaderConstantF(UINT StartRegister,float* pConstantData,UINT Vector4fCount);
  112. HRESULT SetPixelShaderConstantI(UINT StartRegister,const(int)* pConstantData,UINT Vector4iCount);
  113. HRESULT GetPixelShaderConstantI(UINT StartRegister,int* pConstantData,UINT Vector4iCount);
  114. HRESULT SetPixelShaderConstantB(UINT StartRegister,const(BOOL)* pConstantData,UINT BoolCount);
  115. HRESULT GetPixelShaderConstantB(UINT StartRegister,BOOL* pConstantData,UINT BoolCount);
  116. HRESULT DrawRectPatch(UINT Handle,const(float)* pNumSegs,const(D3DRECTPATCH_INFO)* pRectPatchInfo);
  117. HRESULT DrawTriPatch(UINT Handle,const(float)* pNumSegs,const(D3DTRIPATCH_INFO)* pTriPatchInfo);
  118. HRESULT DeletePatch(UINT Handle);
  119. HRESULT CreateQuery(uint Type,void** ppQuery);
  120. HRESULT SetConvolutionMonoKernel(UINT width,UINT height,float* rows,float* columns);
  121. HRESULT ComposeRects(void* pSrc,void* pDst,void* pSrcRectDescs,UINT NumRects,void* pDstRectDescs,uint Operation,int Xoffset,int Yoffset);
  122. HRESULT PresentEx(const(RECT)* pSourceRect,const(RECT)* pDestRect,HWND hDestWindowOverride,const(RGNDATA)* pDirtyRegion,DWORD dwFlags);
  123. HRESULT GetGPUThreadPriority(INT* pPriority);
  124. HRESULT SetGPUThreadPriority(INT Priority);
  125. HRESULT WaitForVBlank(UINT iSwapChain);
  126. HRESULT CheckResourceResidency(void** pResourceArray,UINT32 NumResources);
  127. HRESULT SetMaximumFrameLatency(UINT MaxLatency);
  128. HRESULT GetMaximumFrameLatency(UINT* pMaxLatency);
  129. HRESULT CheckDeviceState(HWND hDestinationWindow);
  130. }