From 5a756d0482f743b7b5070717e776cba1672cb5c3 Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Thu, 20 Jan 2022 17:41:58 -0800 Subject: [PATCH] Added some navigation buttons --- Blob.md | 5 ++++- CaptureTexture.md | 3 +++ Compress.md | 3 +++ ComputeMSE.md | 3 +++ ComputeNormalMap.md | 3 +++ ComputePitch.md | 3 +++ ComputeScanlines.md | 3 +++ Convert.md | 3 +++ ConvertToSinglePlane.md | 3 +++ CopyRectangle.md | 3 +++ CreateShaderResourceView.md | 3 +++ CreateTexture.md | 3 +++ DDS-I-O-Functions.md | 3 +++ Decompress.md | 5 ++++- EvaluateImage.md | 3 +++ Filter-Flags.md | 3 +++ FlipRotate.md | 3 +++ FormatPromoters.md | 3 +++ FormatProperties.md | 3 +++ FormatTests.md | 3 +++ GenerateMipMaps.md | 3 +++ GenerateMipMaps3D.md | 3 +++ GetWICCodec.md | 3 +++ HDR-I-O-Functions.md | 3 +++ Image.md | 3 +++ IsSupportedTexture.md | 3 +++ PremultiplyAlpha.md | 3 +++ Resize.md | 3 +++ ScaleMipMapsAlphaForCoverage.md | 5 ++++- TGA-I-O-Functions.md | 3 +++ TexMetadata.md | 3 +++ TransformImage.md | 3 +++ WIC-I-O-Functions.md | 3 +++ WICFactory.md | 3 +++ 34 files changed, 105 insertions(+), 3 deletions(-) diff --git a/Blob.md b/Blob.md index 321b37e..e2b50b1 100644 --- a/Blob.md +++ b/Blob.md @@ -1,3 +1,6 @@ +|[[DirectXTex]]| +|---| + The **Blob** class is a simple container for binary data, typically used as the result for "save to memory" functions. # Methods @@ -12,4 +15,4 @@ The **Blob** class is a simple container for binary data, typically used as the * **Trim**: Used to reduce the reported size via ``GetBufferSize``. Only succeeds if the new size is less-than-or-equal-to the blob's data memory size. -* **Resize**: Used to resize the buffer. Any existing data is copied to the new buffer (or at least as much as will fit). \ No newline at end of file +* **Resize**: Used to resize the buffer. Any existing data is copied to the new buffer (or at least as much as will fit). diff --git a/CaptureTexture.md b/CaptureTexture.md index 97121c5..408ebf0 100644 --- a/CaptureTexture.md +++ b/CaptureTexture.md @@ -1,3 +1,6 @@ +|[[DirectXTex]]| +|---| + Captures a Direct3D render target and returns an image. > This function is intended for use with tools or editor programs. For runtime/engine use, we strongly recommend using ScreenGrab [DX11](https://github.com/Microsoft/DirectXTK/wiki/ScreenGrab) / [DX12](https://github.com/Microsoft/DirectXTK12/wiki/ScreenGrab) instead of DirectXTex. diff --git a/Compress.md b/Compress.md index 66f4716..08e3b23 100644 --- a/Compress.md +++ b/Compress.md @@ -1,3 +1,6 @@ +|[[DirectXTex]]| +|---| + Compresses an image or set of images to a block-compressed (BC) format. ## CPU Codec diff --git a/ComputeMSE.md b/ComputeMSE.md index 4ca68a3..71be1ee 100644 --- a/ComputeMSE.md +++ b/ComputeMSE.md @@ -1,3 +1,6 @@ +|[[DirectXTex]]| +|---| + Computes the mean-squared error for each component based on two input images. ```cpp diff --git a/ComputeNormalMap.md b/ComputeNormalMap.md index dc82c24..f0e9775 100644 --- a/ComputeNormalMap.md +++ b/ComputeNormalMap.md @@ -1,3 +1,6 @@ +|[[DirectXTex]]| +|---| + Converts a height-map to a normal-map. ```cpp diff --git a/ComputePitch.md b/ComputePitch.md index 0b4e885..fb30569 100644 --- a/ComputePitch.md +++ b/ComputePitch.md @@ -1,3 +1,6 @@ +|[[DirectXTex]]| +|---| + Returns both the row and slice pitch for a given width, height, and DXGI format. It supports a number of flags for overriding the default byte-alignment usually used by ``DDS`` files and Direct3D resources. ```cpp diff --git a/ComputeScanlines.md b/ComputeScanlines.md index f2f17d9..08af3c5 100644 --- a/ComputeScanlines.md +++ b/ComputeScanlines.md @@ -1,3 +1,6 @@ +|[[DirectXTex]]| +|---| + Returns the number of horizontal scanlines in an image given the DXGI format and pixel height. ```cpp diff --git a/Convert.md b/Convert.md index ed9ef0b..6218218 100644 --- a/Convert.md +++ b/Convert.md @@ -1,3 +1,6 @@ +|[[DirectXTex]]| +|---| + Convert an image or set of images from one pixel format to another. ```cpp diff --git a/ConvertToSinglePlane.md b/ConvertToSinglePlane.md index d67caf0..0f93d9a 100644 --- a/ConvertToSinglePlane.md +++ b/ConvertToSinglePlane.md @@ -1,3 +1,6 @@ +|[[DirectXTex]]| +|---| + Converts a planar image (such as 4:2:0 or 4:1:1 video format) to a non-planar format (typically 4:2:2 for video formats). Planar formats are not supported by other texture functions, so this routine can be used to convert planar data to a form that other functions will operate on. ```cpp diff --git a/CopyRectangle.md b/CopyRectangle.md index cdef285..bff8684 100644 --- a/CopyRectangle.md +++ b/CopyRectangle.md @@ -1,3 +1,6 @@ +|[[DirectXTex]]| +|---| + Copies a rectangle of pixels from one image to another. ```cpp diff --git a/CreateShaderResourceView.md b/CreateShaderResourceView.md index 0a3d633..9dd1a98 100644 --- a/CreateShaderResourceView.md +++ b/CreateShaderResourceView.md @@ -1,3 +1,6 @@ +|[[DirectXTex]]| +|---| + Creates a Direct3D 11 resource and shader resource view from a set of images. > This function is intended for use with tools or editor programs. For runtime/engine use, we strongly recommend using [DDSTextureLoader](https://github.com/Microsoft/DirectXTK/wiki/DDSTextureLoader), and/or [WICTextureLoader](https://github.com/Microsoft/DirectXTK/wiki/WICTextureLoader) instead of DirectXTex. diff --git a/CreateTexture.md b/CreateTexture.md index 4a524de..989034b 100644 --- a/CreateTexture.md +++ b/CreateTexture.md @@ -1,3 +1,6 @@ +|[[DirectXTex]]| +|---| + Creates a Direct3D resource from a set of images. > This function is intended for use with tools or editor programs. For runtime/engine use, we strongly recommend using DDSTextureLoader [DX11](https://github.com/Microsoft/DirectXTK/wiki/DDSTextureLoader) / [DX12](https://github.com/Microsoft/DirectXTK12/wiki/DDSTextureLoader), and/or WICTextureLoader [DX11](https://github.com/Microsoft/DirectXTK/wiki/WICTextureLoader) / [DX12](https://github.com/Microsoft/DirectXTK12/wiki/WICTextureLoader) instead of DirectXTex. diff --git a/DDS-I-O-Functions.md b/DDS-I-O-Functions.md index 30a68cc..82d0393 100644 --- a/DDS-I-O-Functions.md +++ b/DDS-I-O-Functions.md @@ -1,3 +1,6 @@ +|[[DirectXTex]]| +|---| + These functions perform file I/O for ``.DDS`` files. These functions support many legacy Direct3D 9 ``.DDS`` files and all Direct3D 10.x/11.x era "DX10" extension ``.DDS`` files # GetMetadataFromDDSMemory, GetMetadataFromDDSFile diff --git a/Decompress.md b/Decompress.md index 8e648ff..7f546f1 100644 --- a/Decompress.md +++ b/Decompress.md @@ -1,3 +1,6 @@ +|[[DirectXTex]]| +|---| + Decompresses a block-compressed (BC) image or set of BC images. ```cpp @@ -29,7 +32,7 @@ _format_: Format to decompress to. If set to ``DXGI_FORMAT_UNKNOWN`` the routine | BC4_SNORM | DXGI_FORMAT_R8_SNORM | | BC5_UNORM | DXGI_FORMAT_R8G8_UNORM | | BC5_SNORM | DXGI_FORMAT_R8G8_SNORM | -| BC6H | DXGI_FORMAT_R32G32B32A32_FLOAT | +| BC6H | DXGI_FORMAT_R32G32B32A32_FLOAT | # Example diff --git a/EvaluateImage.md b/EvaluateImage.md index 36f3bd4..6404fa8 100644 --- a/EvaluateImage.md +++ b/EvaluateImage.md @@ -1,3 +1,6 @@ +|[[DirectXTex]]| +|---| + Evaluates a user-supplied function across an image. ```cpp diff --git a/Filter-Flags.md b/Filter-Flags.md index 4351662..a65e9b6 100644 --- a/Filter-Flags.md +++ b/Filter-Flags.md @@ -1,3 +1,6 @@ +|[[DirectXTex]]| +|---| + ```cpp enum TEX_FILTER_FLAGS ``` diff --git a/FlipRotate.md b/FlipRotate.md index 7f1f3a9..17ce6f7 100644 --- a/FlipRotate.md +++ b/FlipRotate.md @@ -1,3 +1,6 @@ +|[[DirectXTex]]| +|---| + Flip and/or rotate an image. ```cpp diff --git a/FormatPromoters.md b/FormatPromoters.md index 6f52a47..b108db7 100644 --- a/FormatPromoters.md +++ b/FormatPromoters.md @@ -1,3 +1,6 @@ +|[[DirectXTex]]| +|---| + These functions are intended to 'promote' a DXGI format with some special property, if there is such a defined type. ```cpp diff --git a/FormatProperties.md b/FormatProperties.md index 6a3d295..5601afb 100644 --- a/FormatProperties.md +++ b/FormatProperties.md @@ -1,3 +1,6 @@ +|[[DirectXTex]]| +|---| + These functions return properties about known DXGI formats. ```cpp diff --git a/FormatTests.md b/FormatTests.md index 6d28cef..c886c79 100644 --- a/FormatTests.md +++ b/FormatTests.md @@ -1,3 +1,6 @@ +|[[DirectXTex]]| +|---| + These functions perform a Boolean test on the given DXGI format. ```cpp diff --git a/GenerateMipMaps.md b/GenerateMipMaps.md index acb9262..707408b 100644 --- a/GenerateMipMaps.md +++ b/GenerateMipMaps.md @@ -1,3 +1,6 @@ +|[[DirectXTex]]| +|---| + Generates mipmaps for an image or a set of images. > This generates mipmaps for 1D and 2D dimension textures. For 3D dimension textures (a.k.a. volume maps), see [[GenerateMipMaps3D]]. diff --git a/GenerateMipMaps3D.md b/GenerateMipMaps3D.md index 6ce6bd2..7925c4d 100644 --- a/GenerateMipMaps3D.md +++ b/GenerateMipMaps3D.md @@ -1,3 +1,6 @@ +|[[DirectXTex]]| +|---| + Generates mipmaps for a 3D volume texture from a set of images representing the slices. > This generates mipmaps for 3D dimension textures (a.k.a. volume textures). For 1D and 2D dimension textures, see [[GenerateMipMaps]]. diff --git a/GetWICCodec.md b/GetWICCodec.md index ba5cd39..1c77e3e 100644 --- a/GetWICCodec.md +++ b/GetWICCodec.md @@ -1,3 +1,6 @@ +|[[DirectXTex]]| +|---| + Returns a WIC GUID for a given file container given a simple enumeration value. This function is optional and you can instead use the WIC container GUID directly instead. ```cpp diff --git a/HDR-I-O-Functions.md b/HDR-I-O-Functions.md index 7dfc849..aee7e94 100644 --- a/HDR-I-O-Functions.md +++ b/HDR-I-O-Functions.md @@ -1,3 +1,6 @@ +|[[DirectXTex]]| +|---| + The [Radiance RGBE](https://en.wikipedia.org/wiki/RGBE_image_format) (``.HDR``) format is commonly used as a texture source file format in game development for high-dynamic range images, but this format is not supported by any built-in WIC codec. These functions implement a simple reader and writer for this format. # GetMetadataFromHDRMemory, GetMetadataFromHDRFile diff --git a/Image.md b/Image.md index e4acdb2..4ca24c9 100644 --- a/Image.md +++ b/Image.md @@ -1,3 +1,6 @@ +|[[DirectXTex]]| +|---| + The **Image** class is a structure that defines the system memory image most DirectXTex functions operate on. ```cpp diff --git a/IsSupportedTexture.md b/IsSupportedTexture.md index 2eeb655..6a98291 100644 --- a/IsSupportedTexture.md +++ b/IsSupportedTexture.md @@ -1,3 +1,6 @@ +|[[DirectXTex]]| +|---| + Returns true if the given texture metadata describes a texture that is supported by the provided Direct3D device. ```cpp diff --git a/PremultiplyAlpha.md b/PremultiplyAlpha.md index 4721877..870fb4d 100644 --- a/PremultiplyAlpha.md +++ b/PremultiplyAlpha.md @@ -1,3 +1,6 @@ +|[[DirectXTex]]| +|---| + This converts an image to using premultiplied alpha. The format and size are not changed. Note that the conversion to premultipled alpha is not fully reversible. For example if alpha is 0, then all the color information becomes 0. diff --git a/Resize.md b/Resize.md index 4d878a4..aa994b5 100644 --- a/Resize.md +++ b/Resize.md @@ -1,3 +1,6 @@ +|[[DirectXTex]]| +|---| + Resize an image or set of images. > If given a set of images, the resulting ScratchImage will always have mipLevels of 1 (i.e. any mipmaps from the original are discarded). You can generate mipmaps at the new size using [[GenerateMipMaps]] / [[GenerateMipMaps3D]]. diff --git a/ScaleMipMapsAlphaForCoverage.md b/ScaleMipMapsAlphaForCoverage.md index a9d7de0..2b798d1 100644 --- a/ScaleMipMapsAlphaForCoverage.md +++ b/ScaleMipMapsAlphaForCoverage.md @@ -1,3 +1,6 @@ +|[[DirectXTex]]| +|---| + Scales mipmap alpha values to preserve alpha coverage based on an alpha test reference value. > This is intended for use after generating mipimaps with [[GenerateMipMaps]]. It does not support volume mipmaps. @@ -38,7 +41,7 @@ ScratchImage coverageMipChain; hr = coverageMipChain.Initialize(info); if (FAILED(hr)) … - + for (size_t item = 0; item < info.arraySize; ++item) { auto img = mipChain.GetImage(0, item, 0); diff --git a/TGA-I-O-Functions.md b/TGA-I-O-Functions.md index 202883a..7e6c888 100644 --- a/TGA-I-O-Functions.md +++ b/TGA-I-O-Functions.md @@ -1,3 +1,6 @@ +|[[DirectXTex]]| +|---| + The [Targa Truvision](http://en.wikipedia.org/wiki/Truevision_TGA) (``.TGA``) format is commonly used as a texture source file format in game development, but this format is not supported by any built-in WIC codec. These functions implement a simple reader and writer for this format. # GetMetadataFromTGAMemory, GetMetadataFromTGAFile diff --git a/TexMetadata.md b/TexMetadata.md index 2ee36a0..ab3ebff 100644 --- a/TexMetadata.md +++ b/TexMetadata.md @@ -1,3 +1,6 @@ +|[[DirectXTex]]| +|---| + The **TexMetadata** structure describes a (potentially complex) image surface. ```cpp diff --git a/TransformImage.md b/TransformImage.md index 56fb089..c128c5a 100644 --- a/TransformImage.md +++ b/TransformImage.md @@ -1,3 +1,6 @@ +|[[DirectXTex]]| +|---| + Creates a new image by executing a user-supplied function across an input image. ```cpp diff --git a/WIC-I-O-Functions.md b/WIC-I-O-Functions.md index 92cecb7..494c6e5 100644 --- a/WIC-I-O-Functions.md +++ b/WIC-I-O-Functions.md @@ -1,3 +1,6 @@ +|[[DirectXTex]]| +|---| + These functions use the Windows Imaging Component (WIC) to read or write an image file. There are built-in WIC codecs in Windows for ``.BMP``, ``.PNG``, ``.GIF``, ``.TIFF``, ``.JPEG``, and JPEG-XR / HD Photo images. Some containers (``.GIF`` and ``.TIFF``) can contain multi-frame bitmaps files. # GetMetadataFromWICMemory, GetMetadataFromWICFile diff --git a/WICFactory.md b/WICFactory.md index a725e0a..a7e343c 100644 --- a/WICFactory.md +++ b/WICFactory.md @@ -1,3 +1,6 @@ +|[[DirectXTex]]| +|---| + The majority of DirectXTex functions make use of a WIC factory object. This object is normally created on-demand the first time that ``GetWICFactory`` is called. ```cpp