Dds.xml 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <?xml-stylesheet type="text/xsl" href="../Xsl/doc2html.xsl"?>
  3. <doc>
  4. <title>DirectDraw Surface File Format</title>
  5. <chapter>
  6. <title>DirectDraw Surface File Format</title>
  7. <par>
  8. The Microsoft DirectDraw Surface (.dds)
  9. file format is used to store textures and
  10. cubic environment maps, both with and
  11. without mipmap levels. This format can
  12. store uncompressed and compressed formats, and is the preferred file format
  13. for storing DXTn compressed data.
  14. This format was introduced with DirectX 7.0.
  15. In DirectX 8.0, support for volume textures was added.
  16. Many new games use DDS files to store their textures.
  17. More information on DDS files can be found in DirectX SDK documentation.
  18. </par>
  19. <par>
  20. Imaging supports loading and saving of all three types of DDS files -
  21. standard textures, cube maps and volume textures. Each of these types can
  22. be with or without mipmaps and compressed with DXTC.
  23. Pixel formats of DDS files supported by Imaging can be found in the table below.
  24. </par>
  25. <table>
  26. <title>DirectDraw Surface File Format Support</title>
  27. <row>
  28. <th>D3DFORMAT</th>
  29. <th>TImageFormat equivalent</th>
  30. <th>Loading</th>
  31. <th>Saving</th>
  32. </row>
  33. <row>
  34. <td>D3DFMT_R3G3B2</td>
  35. <td><icode>ifR3G3B2</icode></td>
  36. <td>Yes</td><td>Yes</td>
  37. </row>
  38. <row>
  39. <td>D3DFMT_R5G6B5</td>
  40. <td><icode>ifR5G6B5</icode></td>
  41. <td>Yes</td><td>Yes</td>
  42. </row>
  43. <row>
  44. <td>D3DFMT_X1R5G5B5</td>
  45. <td><icode>ifX1R5G5B5</icode></td>
  46. <td>Yes</td><td>Yes</td>
  47. </row>
  48. <row>
  49. <td>D3DFMT_X4R4G4B4</td>
  50. <td><icode>ifX4R4G4B4</icode></td>
  51. <td>Yes</td><td>Yes</td>
  52. </row>
  53. <row>
  54. <td>D3DFMT_R8G8B8</td>
  55. <td><icode>ifR8G8B8</icode></td>
  56. <td>Yes</td><td>Yes</td>
  57. </row>
  58. <row>
  59. <td>D3DFMT_X8R8G8B8</td>
  60. <td><icode>ifX8R8G8B8</icode></td>
  61. <td>Yes</td><td>Yes</td>
  62. </row>
  63. <row>
  64. <td>D3DFMT_A1R5G5B5</td>
  65. <td><icode>ifA1R5G5B5</icode></td>
  66. <td>Yes</td><td>Yes</td>
  67. </row>
  68. <row>
  69. <td>D3DFMT_A4R4G4B4</td>
  70. <td><icode>ifA4R4G4B4</icode></td>
  71. <td>Yes</td><td>Yes</td>
  72. </row>
  73. <row>
  74. <td>D3DFMT_A8R8G8B8</td>
  75. <td><icode>ifA8R8G8B8</icode></td>
  76. <td>Yes</td><td>Yes</td>
  77. </row>
  78. <row>
  79. <td>D3DFMT_A16B16G16R16</td>
  80. <td><icode>ifA16B16G16R16</icode></td>
  81. <td>Yes</td><td>Yes</td>
  82. </row>
  83. <row>
  84. <td>D3DFMT_L8</td>
  85. <td><icode>ifGray8</icode></td>
  86. <td>Yes</td><td>Yes</td>
  87. </row>
  88. <row>
  89. <td>D3DFMT_A8L8</td>
  90. <td><icode>ifA8Gray8</icode></td>
  91. <td>Yes</td><td>Yes</td>
  92. </row>
  93. <row>
  94. <td>D3DFMT_L16</td>
  95. <td><icode>ifGray16</icode></td>
  96. <td>Yes</td><td>Yes</td>
  97. </row>
  98. <row>
  99. <td>D3DFMT_R32F</td>
  100. <td><icode>ifR32F</icode></td>
  101. <td>Yes</td><td>Yes</td>
  102. </row>
  103. <row>
  104. <td>D3DFMT_A32B32G32R32F</td>
  105. <td><icode>ifA32B32G32R32F</icode></td>
  106. <td>Yes</td><td>Yes</td>
  107. </row>
  108. <row>
  109. <td>D3DFMT_X8B8G8R8</td>
  110. <td><icode>ifX8R8G8B8</icode></td>
  111. <td>Yes</td><td>No</td>
  112. </row>
  113. <row>
  114. <td>D3DFMT_A8B8G8R8</td>
  115. <td><icode>ifA8R8G8B8</icode></td>
  116. <td>Yes</td><td>No</td>
  117. </row>
  118. <row>
  119. <td>D3DFMT_X8L8V8U8</td>
  120. <td><icode>ifX8R8G8B8</icode></td>
  121. <td>Yes</td><td>No</td>
  122. </row>
  123. <row>
  124. <td>D3DFMT_Q8W8V8U8</td>
  125. <td><icode>ifA8R8G8B8</icode></td>
  126. <td>Yes</td><td>No</td>
  127. </row>
  128. <row>
  129. <td>D3DFMT_Q16W16V16U16</td>
  130. <td><icode>ifA16B16G16R16</icode></td>
  131. <td>Yes</td><td>No</td>
  132. </row>
  133. <row>
  134. <td>D3DFMT_V8U8</td>
  135. <td><icode>ifA8Gray8</icode></td>
  136. <td>Yes</td><td>No</td>
  137. </row>
  138. <row>
  139. <td>D3DFMT_DXT1</td>
  140. <td><icode>ifDXT1</icode></td>
  141. <td>Yes</td><td>Yes</td>
  142. </row>
  143. <row>
  144. <td>D3DFMT_DXT3</td>
  145. <td><icode>ifDXT3</icode></td>
  146. <td>Yes</td><td>Yes</td>
  147. </row>
  148. <row>
  149. <td>D3DFMT_DXT5</td>
  150. <td><icode>ifDXT5</icode></td>
  151. <td>Yes</td><td>Yes</td>
  152. </row>
  153. </table>
  154. <par>
  155. When working with DDS files you can find useful some options
  156. which can be set by <ref>SetOption</ref> function and their current values
  157. can be get by <ref>GetOption</ref> function.
  158. Or you can set them by modifying properties of <ref>TDDSFileFormat</ref>
  159. class.
  160. Options are divided into two groups - loading options and saving options.
  161. Loading options have prefix <icode>ImagingDDSLoaded</icode> and
  162. they store some properties of the last loaded DDS file.
  163. You can use saving options with prefix <icode>ImagingDDSSave</icode>
  164. to tell Imaging how to save the next DDS file (save settings persist
  165. until they are changed by <ref>SetOption</ref> call) - ordinary texture
  166. or volume texture with mipmaps or other?
  167. You can learn how to use these options and how to load and save DDS files
  168. in <link url="../Procedures/DdsFiles.xml">Loading and Saving DDS Files</link>
  169. section.
  170. </par>
  171. <table>
  172. <title>Options Related to DDS Files</title>
  173. <row>
  174. <th>OptionId</th>
  175. <th>Allowed Values</th>
  176. <th>Usage</th>
  177. </row>
  178. <row>
  179. <td><ref>ImagingDDSLoadedCubeMap</ref></td>
  180. <td><b>0 (false)</b> or <b>1 (true)</b></td>
  181. <td>Indicates whether the last loaded DDS file contained cube
  182. environment map or not. </td>
  183. </row>
  184. <row>
  185. <td><ref>ImagingDDSLoadedVolume</ref></td>
  186. <td><b>0 (false)</b> or <b>1 (true)</b></td>
  187. <td>Indicates whether the last loaded DDS file contained
  188. volume texture or not. </td>
  189. </row>
  190. <row>
  191. <td><ref>ImagingDDSLoadedMipMapCount</ref></td>
  192. <td><b>1</b> to <b>N</b></td>
  193. <td>Number of mip map levels of the last loaded DDS file.</td>
  194. </row>
  195. <row>
  196. <td><ref>ImagingDDSLoadedDepth</ref></td>
  197. <td><b>1</b> to <b>N</b></td>
  198. <td>Depth (slices of volume texture or faces of
  199. cube map) of the last loaded DDS file.</td>
  200. </row>
  201. <row>
  202. <td><ref>ImagingDDSSaveCubeMap</ref></td>
  203. <td><b>0 (false)</b> or <b>1 (true)</b></td>
  204. <td>Indicates whether DDS files will be saved as cube
  205. environment map or not. Default value is <b>0 (false)</b>.</td>
  206. </row>
  207. <row>
  208. <td><ref>ImagingDDSSaveVolume</ref></td>
  209. <td><b>0 (false)</b> or <b>1 (true)</b></td>
  210. <td>Indicates whether DDS files will be saved as
  211. volume texture or not. Default value is <b>0 (false)</b>.</td>
  212. </row>
  213. <row>
  214. <td><ref>ImagingDDSSaveMipMapCount</ref></td>
  215. <td><b>1</b> to <b>N</b></td>
  216. <td>Number of mip map levels to be saved to the next saved DDS file.
  217. Default value is <b>1</b>.</td>
  218. </row>
  219. <row>
  220. <td><ref>ImagingDDSSaveDepth</ref></td>
  221. <td><b>1</b> to <b>N</b></td>
  222. <td>Depth (slices of volume texture or faces of
  223. cube map) of the next saved DDS file.
  224. Default value is <b>1</b>.</td>
  225. </row>
  226. </table>
  227. </chapter>
  228. </doc>