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 MTLVertexDescriptorMTKMetalVertexDescriptorFromModelIO(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 MTLVertexDescriptorMTKMetalVertexDescriptorFromModelIOWithError(MDLVertexDescriptor modelIODescriptor, 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 java.lang.StringMTKModelErrorDomain()[@constant] MTKModelErrorDomainstatic java.lang.StringMTKModelErrorKey()[@constant] MTKModelErrorKeystatic MDLVertexDescriptorMTKModelIOVertexDescriptorFromMetal(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 MDLVertexDescriptorMTKModelIOVertexDescriptorFromMetalWithError(MTLVertexDescriptor metalDescriptor, 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 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 java.lang.StringMTKTextureLoaderErrorDomain()[@constant] MTKTextureLoaderErrorDomainstatic java.lang.StringMTKTextureLoaderErrorKey()[@constant] MTKTextureLoaderErrorKeystatic 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 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 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 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 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 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 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 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 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 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 datastatic 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
public static MDLVertexDescriptor MTKModelIOVertexDescriptorFromMetal(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.
-
MTKModelIOVertexDescriptorFromMetalWithError
public static MDLVertexDescriptor MTKModelIOVertexDescriptorFromMetalWithError(MTLVertexDescriptor metalDescriptor, 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.
-
MTKMetalVertexDescriptorFromModelIO
public static MTLVertexDescriptor MTKMetalVertexDescriptorFromModelIO(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.
-
MTKMetalVertexDescriptorFromModelIOWithError
public static MTLVertexDescriptor MTKMetalVertexDescriptorFromModelIOWithError(MDLVertexDescriptor modelIODescriptor, 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.
-
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.
-
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.
-
MTKTextureLoaderErrorDomain
public static java.lang.String MTKTextureLoaderErrorDomain()
[@constant] MTKTextureLoaderErrorDomain
-
MTKTextureLoaderErrorKey
public static java.lang.String MTKTextureLoaderErrorKey()
[@constant] MTKTextureLoaderErrorKey
-
MTKTextureLoaderOptionAllocateMipmaps
public static 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.
-
MTKTextureLoaderOptionGenerateMipmaps
public static 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.
-
MTKTextureLoaderOptionSRGB
public static 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.
-
MTKTextureLoaderOptionTextureUsage
public static 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.
-
MTKTextureLoaderOptionTextureCPUCacheMode
public static 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.
-
MTKTextureLoaderOptionTextureStorageMode
public static 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.
-
MTKTextureLoaderOptionCubeLayout
public static 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.
-
MTKTextureLoaderCubeLayoutVertical
public static 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.
-
MTKTextureLoaderOptionOrigin
public static 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.
-
MTKTextureLoaderOriginTopLeft
public static 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.
-
MTKTextureLoaderOriginBottomLeft
public static 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.
-
MTKTextureLoaderOriginFlippedVertically
public static 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
-
MTKModelErrorDomain
public static java.lang.String MTKModelErrorDomain()
[@constant] MTKModelErrorDomain
-
MTKModelErrorKey
public static java.lang.String MTKModelErrorKey()
[@constant] MTKModelErrorKey
-
-