MTLTexture

A resource that holds formatted image data.

version(D_ObjectiveC)
extern (Objective-C) extern
interface MTLTexture {}

Members

Aliases

isFramebufferOnly
alias isFramebufferOnly = framebufferOnly
Undocumented in source.
isShareable
alias isShareable = shareable
Undocumented in source.

Functions

allowGPUOptimizedContents
BOOL allowGPUOptimizedContents()

A Boolean value indicating whether the GPU is allowed to adjust the contents of the texture to improve GPU performance.

arrayLength
NSUInteger arrayLength()

The number of slices in the texture array.

buffer
MTLBuffer buffer()

The source buffer that the texture was created from, if any.

bufferBytesPerRow
NSUInteger bufferBytesPerRow()

The number of bytes in each row of the texture’s source buffer, if applicable.

compressionType
MTLTextureCompressionType compressionType()
Undocumented in source.
depth
NSUInteger depth()

The depth of the texture image for the base level mipmap, in pixels.

firstMipmapInTail
NSUInteger firstMipmapInTail()

The index of the first mipmap in the tail.

framebufferOnly
BOOL framebufferOnly()

A Boolean value that indicates whether the texture can only be used as a render target.

getBytes
void getBytes(void* outPixelBytes, NSUInteger bytesPerRow, NSUInteger bytesPerImage, MTLRegion fromRegion, NSUInteger mipmapLevel, NSUInteger slice)

Copies pixel data from the texture to a buffer in system memory.

getBytes
void getBytes(void* outPixelBytes, NSUInteger bytesPerRow, MTLRegion fromRegion, NSUInteger mipmapLevel)

Copies pixel data from the first slice of the texture to a buffer in system memory.

height
NSUInteger height()

The height of the texture image for the base level mipmap, in pixels.

isSparse
BOOL isSparse()

A Boolean value that indicates whether this is a sparse texture.

mipmapLevelCount
NSUInteger mipmapLevelCount()

The number of mipmap levels in the texture.

newRemoteTextureViewForDevice
MTLTexture newRemoteTextureViewForDevice(MTLDevice )

Creates a new texture handle from a shareable texture. Creates a remote texture view for another GPU in the same peer group.

newTextureViewPixelFormat
MTLTexture newTextureViewPixelFormat(MTLPixelFormat )

Creates a new view of the texture, reinterpreting its data using a different pixel format.

newTextureViewWithPixelFormat
MTLTexture newTextureViewWithPixelFormat(MTLPixelFormat pixelFormat, MTLTextureType textureType, NSRange levelRange, NSRange sliceRange)

Creates a new view of the texture, reinterpreting a subset of its data using a different type and pixel format.

newTextureViewWithPixelFormat
MTLTexture newTextureViewWithPixelFormat(MTLPixelFormat pixelFormat, MTLTextureType textureType, NSRange levelRange, NSRange sliceRange, MTLTextureSwizzleChannels swizzle)

Creates a new view of the texture, reinterpreting a subset of its data using a different type, pixel format, and swizzle pattern.

offset
NSUInteger offset()

The offset in the source buffer where the texture's data comes from.

parentRelativeLevel
NSUInteger parentRelativeLevel()

The base level of the parent texture that the texture was created from, if any.

parentRelativeSlice
NSUInteger parentRelativeSlice()

The base slice of the parent texture that the texture was created from, if any.

parentTexture
MTLTexture parentTexture()

The parent texture that the texture was created from, if any.

pixelFormat
MTLPixelFormat pixelFormat()

The format of pixels in the texture.

remoteStorageTexture
MTLTexture remoteStorageTexture()

The texture on another GPU that the texture was created from, if any.

replaceRegion
void replaceRegion(MTLRegion region, NSUInteger mipmapLevel, NSUInteger slice, const(void)* withBytes, NSUInteger bytesPerRow, NSUInteger bytesPerImage)

Copies pixel data into a section of a texture slice.

replaceRegion
void replaceRegion(MTLRegion region, NSUInteger mipmapLevel, const(void)* withBytes, NSUInteger bytesPerRow)

Copies a block of pixels into a section of texture slice 0.

sampleCount
NSUInteger sampleCount()

The number of samples in each pixel.

shareable
BOOL shareable()

A Boolean indicating whether this texture can be shared with other processes.

swizzle
MTLTextureSwizzleChannels swizzle()

The pattern that the GPU applies to pixels when you read or sample pixels from the texture.

tailSizeInBytes
NSUInteger tailSizeInBytes()

The size of the sparse texture tail, in bytes.

textureType
MTLTextureType textureType()

The dimension and arrangement of the texture image data.

usage
MTLTextureUsage usage()

Options that determine how you can use the texture.

width
NSUInteger width()

The width of the texture image for the base level mipmap, in pixels.

Meta