MTLTexture_Extensions Class

Definition

Extension methods to the IMTLTexture interface to support all the methods from the IMTLTexture protocol.

public static class MTLTexture_Extensions
type MTLTexture_Extensions = class
Inheritance
MTLTexture_Extensions

Remarks

The extension methods for IMTLTexture allow developers to treat instances of the interface as having all the optional methods of the original IMTLTexture protocol. Since the interface only contains the required members, these extension methods allow developers to call the optional members of the protocol.

Methods

CreateSharedTextureHandle(IMTLTexture)
CreateTextureView(IMTLTexture, MTLPixelFormat, MTLTextureType, NSRange, NSRange)

Creates and returns a Metal texture that shares the same memory as the source object, but that is interpreted with the new pixel format.

GetAllowGpuOptimizedContents(IMTLTexture)
GetBuffer(IMTLTexture)

Returns the buffer for the target texture.

GetBufferBytesPerRow(IMTLTexture)

Gets the bytes per row in the buffer for the target texture.

GetBufferOffset(IMTLTexture)

Gets the offset into the parent texture where the the target texture data begins.

GetIOSurface(IMTLTexture)

Gets the IOSurface that was used to create this texture, if one was used.

GetIOSurfacePlane(IMTLTexture)

Returns the IOSurface plane used by the surface that is returned from GetIOSurface(IMTLTexture).

GetParentRelativeLevel(IMTLTexture)

Returns the base level of the parent texture from which the target texture was created.

GetParentRelativeSlice(IMTLTexture)

Returns the base slice of the parent texture from which the target texture was created.

GetParentTexture(IMTLTexture)

Returns the parent texture.

GetShareable(IMTLTexture)
GetUsage(IMTLTexture)

Gets a description of how the texture can be used. (For example, as a write target for compute shaders.)

Applies to