Direct3D.xml 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <?xml-stylesheet type="text/xsl" href="../Xsl/doc2html.xsl"?>
  3. <doc>
  4. <title>Direct3D Textures</title>
  5. <chapter>
  6. <title>Direct3D Textures</title>
  7. <par>
  8. This extensions contains functions for loading and saving
  9. <keyword>Direct3D</keyword> textures
  10. using Imaging and for converting images to textures and vice versa.
  11. Currently supported <keyword>Direct3D</keyword> version is 9.0.
  12. You need <keyword>Direct3D</keyword> headers for
  13. <keyword>Object Pascal</keyword> to be able to compile this extension.
  14. They can be found at <link url="http://www.clootie.ru">http://www.clootie.ru</link>.
  15. Extension does not require D3DX library so if you use it
  16. only for loading or saving textures you can replace it by Imaging
  17. and remove dependency on 2+ MiB dll file.
  18. It is implemented in <ref>ImagingDirect3D9.pas</ref> unit located
  19. in <keyword>(ImagingRoot)\Source\Extensions</keyword> directory.
  20. To use it simply add this unit to <icode>uses</icode> list of your program.
  21. Currently only 2D textures are supported, DXTC/S3TC and 3Dc compressed, and
  22. floating point textures are created if supported by hardware.
  23. </par>
  24. <par>
  25. Here is the table with <keyword>Direct3D</keyword> functions
  26. currently available.
  27. There is also Imaging <keyword>Direct3D</keyword> demo you can look at
  28. for inspiration <link url="../Demos/Pascal.xml#d3ddemo">Object Pascal Direct3D Demo</link>.
  29. </par>
  30. <table>
  31. <title>Imaging Direct3D extension functions</title>
  32. <row><th>Loading Functions</th></row>
  33. <row><td><ref>LoadD3DTextureFromFile</ref></td></row>
  34. <row><td><ref>LoadD3DTextureFromStream</ref></td></row>
  35. <row><td><ref>LoadD3DTextureFromMemory</ref></td></row>
  36. <row><th>Saving Functions</th></row>
  37. <row><td><ref>SaveD3DTextureToFile</ref></td></row>
  38. <row><td><ref>SaveD3DTextureToStream</ref></td></row>
  39. <row><td><ref>SaveD3DTextureToMemory</ref></td></row>
  40. <row><th>Conversion Functions</th></row>
  41. <row><td><ref>CreateD3DTextureFromImage</ref></td></row>
  42. <row><td><ref>CreateD3DTextureFromMultiImage</ref></td></row>
  43. <row><td><ref>CreateD3DSurfaceFromImage</ref></td></row>
  44. <row><td><ref>CreateImageFromD3DTexture</ref></td></row>
  45. <row><td><ref>CreateMultiImageFromD3DTexture</ref></td></row>
  46. <row><td><ref>CreateImageFromD3DSurface</ref></td></row>
  47. <row><th>Other Functions</th></row>
  48. <row><td><ref>GetDeviceTextureCaps</ref></td></row>
  49. <row><td><ref>IsD3DFormatSupported</ref></td></row>
  50. <row><td><ref>ImageFormatToD3DFormat</ref></td></row>
  51. <row><td><ref>D3DFormatToImageFormat</ref></td></row>
  52. </table>
  53. <note>
  54. <ref>LoadD3DTextureFromFile</ref> and similar functions use
  55. these default values: All mipmap levels are created, Pool
  56. is D3DPOOL_MANAGED, Usage is 0, Format and size are taken from image.
  57. If you want to set those parameters to other values use
  58. <ref>CreateD3DTextureFromImage</ref> or <ref>CreateD3DTextureFromMultiImage</ref>
  59. instead.
  60. </note>
  61. </chapter>
  62. </doc>