Added some navigation buttons
Родитель
f4484adcc1
Коммит
5a756d0482
5
Blob.md
5
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).
|
||||
* **Resize**: Used to resize the buffer. Any existing data is copied to the new buffer (or at least as much as will fit).
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
|[[DirectXTex]]|
|
||||
|---|
|
||||
|
||||
Compresses an image or set of images to a block-compressed (BC) format.
|
||||
|
||||
## CPU Codec
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
|[[DirectXTex]]|
|
||||
|---|
|
||||
|
||||
Computes the mean-squared error for each component based on two input images.
|
||||
|
||||
```cpp
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
|[[DirectXTex]]|
|
||||
|---|
|
||||
|
||||
Converts a height-map to a normal-map.
|
||||
|
||||
```cpp
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
|[[DirectXTex]]|
|
||||
|---|
|
||||
|
||||
Returns the number of horizontal scanlines in an image given the DXGI format and pixel height.
|
||||
|
||||
```cpp
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
|[[DirectXTex]]|
|
||||
|---|
|
||||
|
||||
Convert an image or set of images from one pixel format to another.
|
||||
|
||||
```cpp
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
|[[DirectXTex]]|
|
||||
|---|
|
||||
|
||||
Copies a rectangle of pixels from one image to another.
|
||||
|
||||
```cpp
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
|[[DirectXTex]]|
|
||||
|---|
|
||||
|
||||
Evaluates a user-supplied function across an image.
|
||||
|
||||
```cpp
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
|[[DirectXTex]]|
|
||||
|---|
|
||||
|
||||
```cpp
|
||||
enum TEX_FILTER_FLAGS
|
||||
```
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
|[[DirectXTex]]|
|
||||
|---|
|
||||
|
||||
Flip and/or rotate an image.
|
||||
|
||||
```cpp
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
|[[DirectXTex]]|
|
||||
|---|
|
||||
|
||||
These functions return properties about known DXGI formats.
|
||||
|
||||
```cpp
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
|[[DirectXTex]]|
|
||||
|---|
|
||||
|
||||
These functions perform a Boolean test on the given DXGI format.
|
||||
|
||||
```cpp
|
||||
|
|
|
@ -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]].
|
||||
|
|
|
@ -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]].
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
3
Image.md
3
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
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
|[[DirectXTex]]|
|
||||
|---|
|
||||
|
||||
Returns true if the given texture metadata describes a texture that is supported by the provided Direct3D device.
|
||||
|
||||
```cpp
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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]].
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
|[[DirectXTex]]|
|
||||
|---|
|
||||
|
||||
The **TexMetadata** structure describes a (potentially complex) image surface.
|
||||
|
||||
```cpp
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
|[[DirectXTex]]|
|
||||
|---|
|
||||
|
||||
Creates a new image by executing a user-supplied function across an input image.
|
||||
|
||||
```cpp
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче