Class MTLTexture

All Implemented Interfaces:
NSObjectProtocol, MTLResource, ObjCProtocol

public final class MTLTexture
extends NSObject
implements MTLResource
  • Constructor Details

    • MTLTexture

      public MTLTexture()
  • Method Details

    • getRootResource

      @Deprecated public MTLResource getRootResource()
      Deprecated.
      Deprecated in iOS 10.0. Use parentTexture or buffer instead
    • getParentTexture

      public MTLTexture getParentTexture()
      Since:
      Available in iOS 9.0 and later.
    • getParentRelativeLevel

      public long getParentRelativeLevel()
      Since:
      Available in iOS 9.0 and later.
    • getParentRelativeSlice

      public long getParentRelativeSlice()
      Since:
      Available in iOS 9.0 and later.
    • getBuffer

      public MTLBuffer getBuffer()
      Since:
      Available in iOS 9.0 and later.
    • getBufferOffset

      public long getBufferOffset()
      Since:
      Available in iOS 9.0 and later.
    • getBufferBytesPerRow

      public long getBufferBytesPerRow()
      Since:
      Available in iOS 9.0 and later.
    • getIosurface

      public IOSurface getIosurface()
      Since:
      Available in iOS 11.0 and later.
    • getIosurfacePlane

      public long getIosurfacePlane()
      Since:
      Available in iOS 11.0 and later.
    • getTextureType

      public MTLTextureType getTextureType()
    • getPixelFormat

      public MTLPixelFormat getPixelFormat()
    • getWidth

      public long getWidth()
    • getHeight

      public long getHeight()
    • getDepth

      public long getDepth()
    • getMipmapLevelCount

      public long getMipmapLevelCount()
    • getSampleCount

      public long getSampleCount()
    • getArrayLength

      public long getArrayLength()
    • getUsage

      public MTLTextureUsage getUsage()
    • isShareable

      public boolean isShareable()
      Since:
      Available in iOS 13.0 and later.
    • isFramebufferOnly

      public boolean isFramebufferOnly()
    • getFirstMipmapInTail

      public long getFirstMipmapInTail()
      Since:
      Available in iOS 13.0 and later.
    • getTailSizeInBytes

      public long getTailSizeInBytes()
      Since:
      Available in iOS 13.0 and later.
    • isSparse

      public boolean isSparse()
      Since:
      Available in iOS 13.0 and later.
    • isAllowGPUOptimizedContents

      public boolean isAllowGPUOptimizedContents()
      Since:
      Available in iOS 12.0 and later.
    • getCompressionType

      public MTLTextureCompressionType getCompressionType()
      Since:
      Available in iOS 15.0 and later.
    • getSwizzle

      public MTLTextureSwizzleChannels getSwizzle()
      Since:
      Available in iOS 13.0 and later.
    • getLabel

      public String getLabel()
      Specified by:
      getLabel in interface MTLResource
    • setLabel

      public void setLabel​(String v)
      Specified by:
      setLabel in interface MTLResource
    • getDevice

      public MTLDevice getDevice()
      Specified by:
      getDevice in interface MTLResource
    • getCpuCacheMode

      public MTLCPUCacheMode getCpuCacheMode()
      Specified by:
      getCpuCacheMode in interface MTLResource
    • getStorageMode

      public MTLStorageMode getStorageMode()
      Specified by:
      getStorageMode in interface MTLResource
      Since:
      Available in iOS 9.0 and later.
    • getHazardTrackingMode

      public MTLHazardTrackingMode getHazardTrackingMode()
      Specified by:
      getHazardTrackingMode in interface MTLResource
      Since:
      Available in iOS 13.0 and later.
    • getResourceOptions

      public MTLResourceOptions getResourceOptions()
      Specified by:
      getResourceOptions in interface MTLResource
      Since:
      Available in iOS 13.0 and later.
    • getHeap

      public MTLHeap getHeap()
      Specified by:
      getHeap in interface MTLResource
      Since:
      Available in iOS 10.0 and later.
    • getHeapOffset

      public long getHeapOffset()
      Specified by:
      getHeapOffset in interface MTLResource
      Since:
      Available in iOS 13.0 and later.
    • getAllocatedSize

      public long getAllocatedSize()
      Specified by:
      getAllocatedSize in interface MTLResource
      Since:
      Available in iOS 11.0 and later.
    • getBytes

      public byte[] getBytes​(int length, long bytesPerRow, long bytesPerImage, MTLRegion region, long level, long slice)
    • replaceRegion

      public void replaceRegion​(MTLRegion region, long level, long slice, byte[] pixelBytes, long bytesPerRow, long bytesPerImage)
    • getBytes

      public byte[] getBytes​(int length, long bytesPerRow, MTLRegion region, long level)
    • replaceRegion

      public void replaceRegion​(MTLRegion region, long level, byte[] pixelBytes, long bytesPerRow)
    • getBytes

      protected void getBytes​(long pixelBytes, long bytesPerRow, long bytesPerImage, MTLRegion region, long level, long slice)
    • replaceRegion

      protected void replaceRegion​(MTLRegion region, long level, long slice, long pixelBytes, long bytesPerRow, long bytesPerImage)
    • getBytes

      protected void getBytes​(long pixelBytes, long bytesPerRow, MTLRegion region, long level)
    • replaceRegion

      protected void replaceRegion​(MTLRegion region, long level, long pixelBytes, long bytesPerRow)
    • newTextureView

      public MTLTexture newTextureView​(MTLPixelFormat pixelFormat)
    • newTextureView

      public MTLTexture newTextureView​(MTLPixelFormat pixelFormat, MTLTextureType textureType, NSRange levelRange, NSRange sliceRange)
      Since:
      Available in iOS 9.0 and later.
    • newSharedTextureHandle

      public MTLSharedTextureHandle newSharedTextureHandle()
      Since:
      Available in iOS 13.0 and later.
    • newTextureView

      public MTLTexture newTextureView​(MTLPixelFormat pixelFormat, MTLTextureType textureType, NSRange levelRange, NSRange sliceRange, MTLTextureSwizzleChannels swizzle)
      Since:
      Available in iOS 13.0 and later.
    • setPurgeableState

      public MTLPurgeableState setPurgeableState​(MTLPurgeableState state)
      Specified by:
      setPurgeableState in interface MTLResource
    • makeAliasable

      public void makeAliasable()
      Specified by:
      makeAliasable in interface MTLResource
      Since:
      Available in iOS 10.0 and later.
    • isAliasable

      public boolean isAliasable()
      Specified by:
      isAliasable in interface MTLResource
      Since:
      Available in iOS 10.0 and later.