Package apple.metal

Class MTLTextureDescriptor

    • Constructor Detail

      • MTLTextureDescriptor

        protected MTLTextureDescriptor​(org.moe.natj.general.Pointer peer)
    • Method Detail

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • allocWithZone

        public static java.lang.Object allocWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
      • automaticallyNotifiesObserversForKey

        public static boolean automaticallyNotifiesObserversForKey​(java.lang.String key)
      • cancelPreviousPerformRequestsWithTarget

        public static void cancelPreviousPerformRequestsWithTarget​(java.lang.Object aTarget)
      • cancelPreviousPerformRequestsWithTargetSelectorObject

        public static void cancelPreviousPerformRequestsWithTargetSelectorObject​(java.lang.Object aTarget,
                                                                                 org.moe.natj.objc.SEL aSelector,
                                                                                 java.lang.Object anArgument)
      • classFallbacksForKeyedArchiver

        public static NSArray<java.lang.String> classFallbacksForKeyedArchiver()
      • classForKeyedUnarchiver

        public static org.moe.natj.objc.Class classForKeyedUnarchiver()
      • debugDescription_static

        public static java.lang.String debugDescription_static()
      • description_static

        public static java.lang.String description_static()
      • hash_static

        public static long hash_static()
      • instanceMethodSignatureForSelector

        public static NSMethodSignature instanceMethodSignatureForSelector​(org.moe.natj.objc.SEL aSelector)
      • instancesRespondToSelector

        public static boolean instancesRespondToSelector​(org.moe.natj.objc.SEL aSelector)
      • isSubclassOfClass

        public static boolean isSubclassOfClass​(org.moe.natj.objc.Class aClass)
      • keyPathsForValuesAffectingValueForKey

        public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey​(java.lang.String key)
      • new_objc

        public static java.lang.Object new_objc()
      • resolveClassMethod

        public static boolean resolveClassMethod​(org.moe.natj.objc.SEL sel)
      • resolveInstanceMethod

        public static boolean resolveInstanceMethod​(org.moe.natj.objc.SEL sel)
      • setVersion_static

        public static void setVersion_static​(long aVersion)
      • superclass_static

        public static org.moe.natj.objc.Class superclass_static()
      • texture2DDescriptorWithPixelFormatWidthHeightMipmapped

        public static MTLTextureDescriptor texture2DDescriptorWithPixelFormatWidthHeightMipmapped​(long pixelFormat,
                                                                                                  long width,
                                                                                                  long height,
                                                                                                  boolean mipmapped)
        texture2DDescriptorWithPixelFormat:width:height:mipmapped: Create a TextureDescriptor for a common 2D texture.
      • textureCubeDescriptorWithPixelFormatSizeMipmapped

        public static MTLTextureDescriptor textureCubeDescriptorWithPixelFormatSizeMipmapped​(long pixelFormat,
                                                                                             long size,
                                                                                             boolean mipmapped)
        textureCubeDescriptorWithPixelFormat:size:mipmapped: Create a TextureDescriptor for a common Cube texture.
      • version_static

        public static long version_static()
      • arrayLength

        public long arrayLength()
        [@property] arrayLength The number of array elements to allocate. The default value is 1. When allocating any non-Array texture type, arrayLength has to be 1. Otherwise it must be set to something greater than 1 and less than 2048.
      • copyWithZone

        public java.lang.Object copyWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
        Specified by:
        copyWithZone in interface NSCopying
      • cpuCacheMode

        public long cpuCacheMode()
        [@property] cpuCacheMode Options to specify CPU cache mode of texture resource.
      • depth

        public long depth()
        [@property] depth The depth of the texture to create. The default value is 1. depth When allocating any texture types other than 3D, depth must be 1.
      • height

        public long height()
        [@property] height The height of the texture to create. The default value is 1. height If allocating a 1D texture, height must be 1.
      • mipmapLevelCount

        public long mipmapLevelCount()
        [@property] mipmapLevelCount The number of mipmap levels to allocate. The default value is 1. When creating Buffer and Multisample textures, mipmapLevelCount must be 1.
      • pixelFormat

        public long pixelFormat()
        [@property] pixelFormat The pixel format to use when allocating this texture. This is also the pixel format that will be used to when the caller writes or reads pixels from this texture. The default value is MTLPixelFormatRGBA8Unorm.
      • resourceOptions

        public long resourceOptions()
        [@property] resourceOptions Options to control memory allocation parameters, etc. Contains a packed set of the storageMode, cpuCacheMode and hazardTrackingMode properties.
      • sampleCount

        public long sampleCount()
        [@property] sampleCount The number of samples in the texture to create. The default value is 1. When creating Buffer textures sampleCount must be 1. Implementations may round sample counts up to the next supported value.
      • setArrayLength

        public void setArrayLength​(long value)
        [@property] arrayLength The number of array elements to allocate. The default value is 1. When allocating any non-Array texture type, arrayLength has to be 1. Otherwise it must be set to something greater than 1 and less than 2048.
      • setCpuCacheMode

        public void setCpuCacheMode​(long value)
        [@property] cpuCacheMode Options to specify CPU cache mode of texture resource.
      • setDepth

        public void setDepth​(long value)
        [@property] depth The depth of the texture to create. The default value is 1. depth When allocating any texture types other than 3D, depth must be 1.
      • setHeight

        public void setHeight​(long value)
        [@property] height The height of the texture to create. The default value is 1. height If allocating a 1D texture, height must be 1.
      • setMipmapLevelCount

        public void setMipmapLevelCount​(long value)
        [@property] mipmapLevelCount The number of mipmap levels to allocate. The default value is 1. When creating Buffer and Multisample textures, mipmapLevelCount must be 1.
      • setPixelFormat

        public void setPixelFormat​(long value)
        [@property] pixelFormat The pixel format to use when allocating this texture. This is also the pixel format that will be used to when the caller writes or reads pixels from this texture. The default value is MTLPixelFormatRGBA8Unorm.
      • setResourceOptions

        public void setResourceOptions​(long value)
        [@property] resourceOptions Options to control memory allocation parameters, etc. Contains a packed set of the storageMode, cpuCacheMode and hazardTrackingMode properties.
      • setSampleCount

        public void setSampleCount​(long value)
        [@property] sampleCount The number of samples in the texture to create. The default value is 1. When creating Buffer textures sampleCount must be 1. Implementations may round sample counts up to the next supported value.
      • setStorageMode

        public void setStorageMode​(long value)
        [@property] storageMode To specify storage mode of texture resource.
      • setTextureType

        public void setTextureType​(long value)
        [@property] type The overall type of the texture to be created. The default value is MTLTextureType2D.
      • setUsage

        public void setUsage​(long value)
        [@property] usage Description of texture usage
      • setWidth

        public void setWidth​(long value)
        [@property] width The width of the texture to create. The default value is 1.
      • storageMode

        public long storageMode()
        [@property] storageMode To specify storage mode of texture resource.
      • textureType

        public long textureType()
        [@property] type The overall type of the texture to be created. The default value is MTLTextureType2D.
      • usage

        public long usage()
        [@property] usage Description of texture usage
      • width

        public long width()
        [@property] width The width of the texture to create. The default value is 1.
      • allowGPUOptimizedContents

        public boolean allowGPUOptimizedContents()
        [@property] allowGPUOptimizedContents Allow GPU-optimization for the contents of this texture. The default value is true. Useful for opting-out of GPU-optimization when implicit optimization (e.g. RT writes) is regressing CPU-read-back performance. See the documentation for optimizeContentsForGPUAccess: and optimizeContentsForCPUAccess: APIs.
      • hazardTrackingMode

        public long hazardTrackingMode()
        [@property] hazardTrackingMode Set hazard tracking mode for the texture. The default value is MTLHazardTrackingModeDefault. For resources created from the device, MTLHazardTrackingModeDefault is treated as MTLHazardTrackingModeTracked. For resources created on a heap, MTLHazardTrackingModeDefault is treated as the hazardTrackingMode of the heap itself. In either case, it is possible to opt-out of hazard tracking by setting MTLHazardTrackingModeUntracked. It is not possible to opt-in to hazard tracking on a heap that itself is not hazard tracked. For optimal performance, perform hazard tracking manually through MTLFence or MTLEvent instead.
      • setAllowGPUOptimizedContents

        public void setAllowGPUOptimizedContents​(boolean value)
        [@property] allowGPUOptimizedContents Allow GPU-optimization for the contents of this texture. The default value is true. Useful for opting-out of GPU-optimization when implicit optimization (e.g. RT writes) is regressing CPU-read-back performance. See the documentation for optimizeContentsForGPUAccess: and optimizeContentsForCPUAccess: APIs.
      • setHazardTrackingMode

        public void setHazardTrackingMode​(long value)
        [@property] hazardTrackingMode Set hazard tracking mode for the texture. The default value is MTLHazardTrackingModeDefault. For resources created from the device, MTLHazardTrackingModeDefault is treated as MTLHazardTrackingModeTracked. For resources created on a heap, MTLHazardTrackingModeDefault is treated as the hazardTrackingMode of the heap itself. In either case, it is possible to opt-out of hazard tracking by setting MTLHazardTrackingModeUntracked. It is not possible to opt-in to hazard tracking on a heap that itself is not hazard tracked. For optimal performance, perform hazard tracking manually through MTLFence or MTLEvent instead.
      • setSwizzle

        public void setSwizzle​(MTLTextureSwizzleChannels value)
        [@property] swizzle Channel swizzle to use when reading or sampling from the texture, the default value is MTLTextureSwizzleChannelsDefault.
      • swizzle

        public MTLTextureSwizzleChannels swizzle()
        [@property] swizzle Channel swizzle to use when reading or sampling from the texture, the default value is MTLTextureSwizzleChannelsDefault.
      • textureBufferDescriptorWithPixelFormatWidthResourceOptionsUsage

        public static MTLTextureDescriptor textureBufferDescriptorWithPixelFormatWidthResourceOptionsUsage​(long pixelFormat,
                                                                                                           long width,
                                                                                                           long resourceOptions,
                                                                                                           long usage)
        textureBufferDescriptorWithPixelFormat:width:resourceOptions:usage: Create a TextureDescriptor for a common texture buffer.