Type Method

textureBufferDescriptorWithPixelFormat:width:resourceOptions:usage:

Creates a texture descriptor object for a texture buffer.

Declaration

+ (MTLTextureDescriptor *)textureBufferDescriptorWithPixelFormat:(MTLPixelFormat)pixelFormat width:(NSUInteger)width resourceOptions:(MTLResourceOptions)resourceOptions usage:(MTLTextureUsage)usage;

Parameters

pixelFormat

The format describing how every pixel on the texture buffer is stored. The default value is MTLPixelFormatRGBA8Unorm.

width

The width of the texture buffer. The value must be greater than or equal to 1.

resourceOptions

The access options to use for the new texture buffer.

usage

The allowed usage of the new texture buffer.

Return Value

A pointer to a texture descriptor object for a texture buffer.

See Also

Creating Texture Descriptors

+ texture2DDescriptorWithPixelFormat:width:height:mipmapped:

Creates a texture descriptor object for a 2D texture.

+ textureCubeDescriptorWithPixelFormat:size:mipmapped:

Creates a texture descriptor object for a cube texture.