Device.createTexture - multiple declarations
Function Device.createTexture
Creates a new Texture
.
Texture createTexture
(
uint width,
uint height,
const(TextureFormat) format,
const(TextureUsage) usage,
const(TextureDimension) dimension = TextureDimension ._2d,
uint mipLevelCount = 1u,
uint sampleCount = 1u,
uint depthOrArrayLayers = 1u,
const(string) label = null
) const;
Remarks
The created texture will have one mip level and a single sample used in fragments.
Parameters
Name | Description |
---|---|
width | Width of the texture. |
height | Height of the texture. |
format | Bit-level format of the texture's data. |
usage | How the texture shall be used. |
dimension | Dimesnionality of the texture, e.g. 2D or 3D. Defaults to 2D. |
mipLevelCount | Number of mipmapping levels of this texture, usually used to reduce aliasing effects. Defaults to one. |
sampleCount | Number of samples used in each fragment. Defaults to one. |
depthOrArrayLayers | Depth/total array layers of the texture. Defaults to one. See Limits . |
label | Optional, human-readable debug label for the texture. |
Function Device.createTexture
Creates a new Texture
.
Texture createTexture
(
const(__C .WGPUExtent3D) extent,
const(TextureFormat) format,
const(TextureUsage) usage,
const(TextureDimension) dimension = TextureDimension ._2d,
uint mipLevelCount = 1u,
uint sampleCount = 1u,
const(string) label = null
) const;
Parameters
Name | Description |
---|---|
extent | Size and depth/total array layers of the texture. See Limits . |
format | Bit-level format of the texture's data. |
usage | How the texture shall be used. |
dimension | Dimesnionality of the texture, e.g. 2D or 3D. Defaults to 2D. |
mipLevelCount | Number of mipmapping levels of this texture, usually used to reduce aliasing effects. Defaults to one. |
sampleCount | Number of samples used in each fragment. Defaults to one. |
label | Optional, human-readable debug label for the texture. |
Function Device.createTexture
Creates a new Texture
.
Parameters
Name | Description |
---|---|
descriptor | Specifies the general format of the texture. |