Package apple.metalkit.c
Class MetalKit
- java.lang.Object
-
- apple.metalkit.c.MetalKit
-
public final class MetalKit extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static @Nullable MTLVertexDescriptorMTKMetalVertexDescriptorFromModelIO(@NotNull MDLVertexDescriptor modelIODescriptor)[@function] MTKMetalVertexDescriptorFromModelIO Partially converts a Model I/O vertex descriptor to a Metal vertex descriptor This method can only set vertex format, offset, bufferIndex, and stride information in the produced Metal vertex descriptor.static @Nullable MTLVertexDescriptorMTKMetalVertexDescriptorFromModelIOWithError(@NotNull MDLVertexDescriptor modelIODescriptor, @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)[@function] MTKMetalVertexDescriptorFromModelIOWithError Partially converts a Model I/O vertex descriptor to a Metal vertex descriptor This method can only set vertex format, offset, bufferIndex, and stride information in the produced Metal vertex descriptor.static longMTKMetalVertexFormatFromModelIO(long vertexFormat)[@function] MTKMetalVertexFormatFromModelIO Converts a Model I/O vertex format to a Metal vertex formatstatic @NotNull java.lang.StringMTKModelErrorDomain()[@constant] MTKModelErrorDomain API-Since: 9.0static @NotNull java.lang.StringMTKModelErrorKey()[@constant] MTKModelErrorKey API-Since: 9.0static @NotNull MDLVertexDescriptorMTKModelIOVertexDescriptorFromMetal(@NotNull MTLVertexDescriptor metalDescriptor)[@function] MTKModelIOVertexDescriptorFromMetal Partially converts a Metal vertex descriptor to a Model I/O vertex descriptor This method can only set vertex format, offset, bufferIndex, and stride information in the produced Model I/O vertex descriptor.static @NotNull MDLVertexDescriptorMTKModelIOVertexDescriptorFromMetalWithError(@NotNull MTLVertexDescriptor metalDescriptor, @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)[@function] MTKModelIOVertexDescriptorFromMetalWithError Partially converts a Metal vertex descriptor to a Model I/O vertex descriptor This method can only set vertex format, offset, bufferIndex, and stride information in the produced Model I/O vertex descriptor.static longMTKModelIOVertexFormatFromMetal(long vertexFormat)[@function] MTKModelIOVertexFormatFromMetal Converts a Metal vertex format to a Model I/O vertex formatstatic @NotNull java.lang.StringMTKTextureLoaderCubeLayoutVertical()[@constant] MTKTextureLoaderCubeLayoutVertical Identifier specifying that the texture loader will create a cube texture from six faces arranged vertically within a single 2D image A texture cube will be created from six faces arranged vertically within a single 2D image.static @NotNull java.lang.StringMTKTextureLoaderErrorDomain()[@constant] MTKTextureLoaderErrorDomain API-Since: 9.0static @NotNull java.lang.StringMTKTextureLoaderErrorKey()[@constant] MTKTextureLoaderErrorKey API-Since: 9.0static @NotNull java.lang.StringMTKTextureLoaderOptionAllocateMipmaps()[@constant] MTKTextureLoaderOptionAllocateMipmaps Identifier to be used in an options NSDictionary with a boolean NSNumber specifying whether to allocate memory for mipmaps when creating the texture If the boolean value specified with this string is true, the resulting Metal texture will have been created with mipmaps whose contents are undefined.static @NotNull java.lang.StringMTKTextureLoaderOptionCubeLayout()[@constant] MTKTextureLoaderOptionCubeLayout Identifier to be used in an options NSDictionary with an MTKTextureLoaderCubeLayout NSString specifying whether to create a cubemap from a 2D image The NSString value specified with this string must be one option of MTKTextureLoaderCubeLayout.static @NotNull java.lang.StringMTKTextureLoaderOptionGenerateMipmaps()[@constant] MTKTextureLoaderOptionGenerateMipmaps Identifier to be used in an options NSDictionary with a boolean NSNumber specifying whether to generate mipmaps when creating the texture If the boolean value specified with this string is true, the resulting Metal texture will be created with mipmaps.static @NotNull java.lang.StringMTKTextureLoaderOptionLoadAsArray()[@constant] MTKTextureLoaderOptionLoadAsArray Identifier specifying that the texture should be loaded as an array texture when possible.static @NotNull java.lang.StringMTKTextureLoaderOptionOrigin()[@constant] MTKTextureLoaderOptionOrigin Identifier to be used in an options NSDictionary with an MTKTextureLoaderOrigin NSString specifying whether to flip textures vertically The NSString value specified with this string must be one option of MTKTextureLoaderOrigin.static @NotNull java.lang.StringMTKTextureLoaderOptionSRGB()[@constant] MTKTextureLoaderOptionSRGB Identifier to be used in an options NSDictionary with a boolean NSNumber specifying whether to create the texture with an sRGB (gamma corrected) pixel format If the boolean value specified with this string is true, the texture will be created with an sRGB pixel format regardless of whether the image file specifies that the data has already been gamma corrected.static @NotNull java.lang.StringMTKTextureLoaderOptionTextureCPUCacheMode()[@constant] MTKTextureLoaderOptionTextureCPUCacheMode Identifier to be used with an NSNumber specifying the MTLCPUCacheMode The resulting Metal texture will be created with the MTLCPUCacheMode indicated by the NSNumber associated with this string.static @NotNull java.lang.StringMTKTextureLoaderOptionTextureStorageMode()[@constant] MTKTextureLoaderOptionTextureStorageMode Identifier to be used with an NSNumber specifying the MTLStorageMode The resulting Metal texture will be created with the MTLStorageMode indicated by the NSNumber associated with this string.static @NotNull java.lang.StringMTKTextureLoaderOptionTextureUsage()[@constant] MTKTextureLoaderOptionTextureUsage Identifier to be used with an NSNumber specifying the MTLTextureUsage flags The resulting Metal texture will be created with the MTLTextureUsage flags indicated by the NSNumber associated with this string.static @NotNull java.lang.StringMTKTextureLoaderOriginBottomLeft()[@constant] MTKTextureLoaderOriginBottomLeft Identifier specifying that the texture loader should flip textures whose origin is in the top-left corner The texture will be flipped vertically if metadata in the file being loaded indicates that the source data starts with the top-left corner of the texture.static @NotNull java.lang.StringMTKTextureLoaderOriginFlippedVertically()[@constant] MTKTextureLoaderOriginFlippedVertically Identifier specifying that the texture loader should always flip textures The texture will be flipped vertically regardless of any metadata in the file indicating the placement of the origin in the source data API-Since: 10.0static @NotNull java.lang.StringMTKTextureLoaderOriginTopLeft()[@constant] MTKTextureLoaderOriginTopLeft Identifier specifying that the texture loader should flip textures whose origin is in the bottom-left corner The texture will be flipped vertically if metadata in the file being loaded indicates that the source data starts with the bottom-left corner of the texture.
-
-
-
Method Detail
-
MTKModelIOVertexDescriptorFromMetal
@NotNull public static @NotNull MDLVertexDescriptor MTKModelIOVertexDescriptorFromMetal(@NotNull @NotNull MTLVertexDescriptor metalDescriptor)
[@function] MTKModelIOVertexDescriptorFromMetal Partially converts a Metal vertex descriptor to a Model I/O vertex descriptor This method can only set vertex format, offset, bufferIndex, and stride information in the produced Model I/O vertex descriptor. It does not add any semantic information such at attributes names. Names must be set in the returned Model I/O vertex descriptor before it can be applied to a a Model I/O mesh. API-Since: 9.0
-
MTKModelIOVertexDescriptorFromMetalWithError
@NotNull public static @NotNull MDLVertexDescriptor MTKModelIOVertexDescriptorFromMetalWithError(@NotNull @NotNull MTLVertexDescriptor metalDescriptor, @Nullable @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
[@function] MTKModelIOVertexDescriptorFromMetalWithError Partially converts a Metal vertex descriptor to a Model I/O vertex descriptor This method can only set vertex format, offset, bufferIndex, and stride information in the produced Model I/O vertex descriptor. It does not add any semantic information such at attributes names. Names must be set in the returned Model I/O vertex descriptor before it can be applied to a a Model I/O mesh. If error is nonnull, and the conversion cannot be made, it will be set. API-Since: 10.0
-
MTKMetalVertexDescriptorFromModelIO
@Nullable public static @Nullable MTLVertexDescriptor MTKMetalVertexDescriptorFromModelIO(@NotNull @NotNull MDLVertexDescriptor modelIODescriptor)
[@function] MTKMetalVertexDescriptorFromModelIO Partially converts a Model I/O vertex descriptor to a Metal vertex descriptor This method can only set vertex format, offset, bufferIndex, and stride information in the produced Metal vertex descriptor. It simply copies attributes 1 for 1. Thus attributes in the given Model I/O vertex descriptor must be arranged in the correct order for the resulting descriptor to properly map mesh data to vertex shader inputs. Layout stepFunction and stepRates for the resulting MTLVertexDescriptor must also be set by application. API-Since: 9.0
-
MTKMetalVertexDescriptorFromModelIOWithError
@Nullable public static @Nullable MTLVertexDescriptor MTKMetalVertexDescriptorFromModelIOWithError(@NotNull @NotNull MDLVertexDescriptor modelIODescriptor, @Nullable @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
[@function] MTKMetalVertexDescriptorFromModelIOWithError Partially converts a Model I/O vertex descriptor to a Metal vertex descriptor This method can only set vertex format, offset, bufferIndex, and stride information in the produced Metal vertex descriptor. It simply copies attributes 1 for 1. Thus attributes in the given Model I/O vertex descriptor must be arranged in the correct order for the resulting descriptor to properly map mesh data to vertex shader inputs. Layout stepFunction and stepRates for the resulting MTLVertexDescriptor must also be set by application. If error is nonnull, and the conversion cannot be made, it will be set. API-Since: 10.0
-
MTKModelIOVertexFormatFromMetal
public static long MTKModelIOVertexFormatFromMetal(long vertexFormat)
[@function] MTKModelIOVertexFormatFromMetal Converts a Metal vertex format to a Model I/O vertex format- Returns:
- A Model I/O vertexformat correspoinding to the given Metal vertex format. Returns MDLVertexFormatInvalid if no matching Model I/O vertex format exists. API-Since: 9.0
-
MTKMetalVertexFormatFromModelIO
public static long MTKMetalVertexFormatFromModelIO(long vertexFormat)
[@function] MTKMetalVertexFormatFromModelIO Converts a Model I/O vertex format to a Metal vertex format- Returns:
- A Metal vertexformat correspoinding to the given Model I/O vertex format. Returns MTLVertexFormatInvalid if no matching Metal vertex format exists. API-Since: 9.0
-
MTKTextureLoaderErrorDomain
@NotNull public static @NotNull java.lang.String MTKTextureLoaderErrorDomain()
[@constant] MTKTextureLoaderErrorDomain API-Since: 9.0
-
MTKTextureLoaderErrorKey
@NotNull public static @NotNull java.lang.String MTKTextureLoaderErrorKey()
[@constant] MTKTextureLoaderErrorKey API-Since: 9.0
-
MTKTextureLoaderOptionAllocateMipmaps
@NotNull public static @NotNull java.lang.String MTKTextureLoaderOptionAllocateMipmaps()
[@constant] MTKTextureLoaderOptionAllocateMipmaps Identifier to be used in an options NSDictionary with a boolean NSNumber specifying whether to allocate memory for mipmaps when creating the texture If the boolean value specified with this string is true, the resulting Metal texture will have been created with mipmaps whose contents are undefined. It is the responsibility of the caller to fill out the contents of the mipmap data unless MTLTextureLoaderOptionGenerateMipmaps is specified. If the file being loaded contains data for mipmaps (such as in a PVR or KTX file) this option does not need to be specified. In those cases the mipmap memory will be allocated and the image data loaded. API-Since: 9.0
-
MTKTextureLoaderOptionGenerateMipmaps
@NotNull public static @NotNull java.lang.String MTKTextureLoaderOptionGenerateMipmaps()
[@constant] MTKTextureLoaderOptionGenerateMipmaps Identifier to be used in an options NSDictionary with a boolean NSNumber specifying whether to generate mipmaps when creating the texture If the boolean value specified with this string is true, the resulting Metal texture will be created with mipmaps. If the file being loaded contains data for mipmaps (such as in a PVR or KTX file), specifying this option will overwrite the existing mipmap data in the loaded texture. This option can only be used if the pixel format of the texture is color filterable and color renderable. This option implies MTKTextureLoaderOptionAllocateMipmaps. Specifying this option will cause the MTKTextureLoader to submit work to the GPU on behalf of the caller. API-Since: 10.0
-
MTKTextureLoaderOptionSRGB
@NotNull public static @NotNull java.lang.String MTKTextureLoaderOptionSRGB()
[@constant] MTKTextureLoaderOptionSRGB Identifier to be used in an options NSDictionary with a boolean NSNumber specifying whether to create the texture with an sRGB (gamma corrected) pixel format If the boolean value specified with this string is true, the texture will be created with an sRGB pixel format regardless of whether the image file specifies that the data has already been gamma corrected. Likewise, if false, the texture will be created with a non-sRGB pixel format regardless of whether the image file specifies that the data has been gamma corrected. To use the sRGB information specified in the file, do not specify this in the options dictionary. [@warning] When deploying to OS's prior to macOS 10.15 / iOS 13.0, this option is ignored for loading KTX textures. API-Since: 9.0
-
MTKTextureLoaderOptionTextureUsage
@NotNull public static @NotNull java.lang.String MTKTextureLoaderOptionTextureUsage()
[@constant] MTKTextureLoaderOptionTextureUsage Identifier to be used with an NSNumber specifying the MTLTextureUsage flags The resulting Metal texture will be created with the MTLTextureUsage flags indicated by the NSNumber associated with this string. API-Since: 9.0
-
MTKTextureLoaderOptionTextureCPUCacheMode
@NotNull public static @NotNull java.lang.String MTKTextureLoaderOptionTextureCPUCacheMode()
[@constant] MTKTextureLoaderOptionTextureCPUCacheMode Identifier to be used with an NSNumber specifying the MTLCPUCacheMode The resulting Metal texture will be created with the MTLCPUCacheMode indicated by the NSNumber associated with this string. API-Since: 9.0
-
MTKTextureLoaderOptionTextureStorageMode
@NotNull public static @NotNull java.lang.String MTKTextureLoaderOptionTextureStorageMode()
[@constant] MTKTextureLoaderOptionTextureStorageMode Identifier to be used with an NSNumber specifying the MTLStorageMode The resulting Metal texture will be created with the MTLStorageMode indicated by the NSNumber associated with this string. If this option is omitted, the texture will be created with the default storage mode for Metal textures: MTLStorageModeShared on iOS, and MTLStorageModeManaged on OS X. Specifying this option with MTLTextureStorageModePrivate cause the MTKTextureLoader to submit work to the GPU on behalf of the caller. API-Since: 10.0
-
MTKTextureLoaderOptionCubeLayout
@NotNull public static @NotNull java.lang.String MTKTextureLoaderOptionCubeLayout()
[@constant] MTKTextureLoaderOptionCubeLayout Identifier to be used in an options NSDictionary with an MTKTextureLoaderCubeLayout NSString specifying whether to create a cubemap from a 2D image The NSString value specified with this string must be one option of MTKTextureLoaderCubeLayout. If this option is omitted, the texture loader will not create cubemaps from 2D textures. This option cannot be used with PVR files, KTX files, or MDLTextures, which support cube textures directly. API-Since: 10.0
-
MTKTextureLoaderCubeLayoutVertical
@NotNull public static @NotNull java.lang.String MTKTextureLoaderCubeLayoutVertical()
[@constant] MTKTextureLoaderCubeLayoutVertical Identifier specifying that the texture loader will create a cube texture from six faces arranged vertically within a single 2D image A texture cube will be created from six faces arranged vertically within a single 2D image. The image height must be six times the image width, with faces arranged in the following order from top to bottom: +X, -X, +Y, -Y, +Z, -Z. API-Since: 10.0
-
MTKTextureLoaderOptionOrigin
@NotNull public static @NotNull java.lang.String MTKTextureLoaderOptionOrigin()
[@constant] MTKTextureLoaderOptionOrigin Identifier to be used in an options NSDictionary with an MTKTextureLoaderOrigin NSString specifying whether to flip textures vertically The NSString value specified with this string must be one option of MTKTextureLoaderOrigin. If this option is omitted, the texture loader will not flip loaded textures. This option cannot be used with block-compressed texture formats, and can only be used with 2D, 2D array, and cube map textures. Each mipmap level and slice of a texture will be flipped. API-Since: 10.0
-
MTKTextureLoaderOriginTopLeft
@NotNull public static @NotNull java.lang.String MTKTextureLoaderOriginTopLeft()
[@constant] MTKTextureLoaderOriginTopLeft Identifier specifying that the texture loader should flip textures whose origin is in the bottom-left corner The texture will be flipped vertically if metadata in the file being loaded indicates that the source data starts with the bottom-left corner of the texture. API-Since: 10.0
-
MTKTextureLoaderOriginBottomLeft
@NotNull public static @NotNull java.lang.String MTKTextureLoaderOriginBottomLeft()
[@constant] MTKTextureLoaderOriginBottomLeft Identifier specifying that the texture loader should flip textures whose origin is in the top-left corner The texture will be flipped vertically if metadata in the file being loaded indicates that the source data starts with the top-left corner of the texture. API-Since: 10.0
-
MTKTextureLoaderOriginFlippedVertically
@NotNull public static @NotNull java.lang.String MTKTextureLoaderOriginFlippedVertically()
[@constant] MTKTextureLoaderOriginFlippedVertically Identifier specifying that the texture loader should always flip textures The texture will be flipped vertically regardless of any metadata in the file indicating the placement of the origin in the source data API-Since: 10.0
-
MTKModelErrorDomain
@NotNull public static @NotNull java.lang.String MTKModelErrorDomain()
[@constant] MTKModelErrorDomain API-Since: 9.0
-
MTKModelErrorKey
@NotNull public static @NotNull java.lang.String MTKModelErrorKey()
[@constant] MTKModelErrorKey API-Since: 9.0
-
MTKTextureLoaderOptionLoadAsArray
@NotNull public static @NotNull java.lang.String MTKTextureLoaderOptionLoadAsArray()
[@constant] MTKTextureLoaderOptionLoadAsArray Identifier specifying that the texture should be loaded as an array texture when possible. Type is an NSNumber with a boolean value. API-Since: 17.0
-
-