Metal Framework Reference

Introduction

Classes   Protocols   Other Reference  

The Metal Framework provides extremely low-overhead access to the GPU, enabling incredibly high performance for your sophisticated graphics rendering and computational tasks. Metal eliminates many performance bottlenecks—such as costly state validation—that are found in traditional graphics APIs. Metal moves all expensive state translation and compilation operations out of the critical path of your most performance sensitive rendering code. It provides precompiled shaders, state objects, and explicit command scheduling to ensure that your application achieves the highest possible performance and efficiency.

Graphics, compute, and blit commands can be used together seamlessly and efficiently. Metal is specifically designed to exploit modern architectural considerations, such as multiprocessing and shared memory, to make it easy to parallelize the creation of GPU commands.

Classes

NSObject

NSObject is the root class of most Objective-C class hierarchies.

MTLArgument

MTLArgument object describes a single argument to a Metal function.

MTLArrayType

MTLArrayType object provides details about a MTLStructMember object that is an array.

MTLCompileOptions

MTLCompileOptions object is used to specify how a new Metal shader library should be compiled.

MTLComputePipelineReflection

MTLComputePipelineReflection object provides access to the arguments of the compute function used in a MTLComputePipelineState object.

MTLDepthStencilDescriptor

MTLDepthStencilDescriptor object is used to define a specific configuration of the depth and stencil stages of a rendering pipeline.

MTLRenderPassAttachmentDescriptor

MTLRenderPassAttachmentDescriptor object is used to configure an individual render target of a framebuffer.

MTLRenderPassColorAttachmentDescriptor

MTLRenderPassColorAttachmentDescriptor object is used to configure an individual render target whose texture has a color-renderable pixel format.

MTLRenderPassDepthAttachmentDescriptor

MTLRenderPassDepthAttachmentDescriptor object is used to configure an individual render target whose texture has a depth-renderable pixel format.

MTLRenderPassStencilAttachmentDescriptor

MTLRenderPassStencilAttachmentDescriptor object is used to configure an individual render target that has a texture with a stencil-renderable pixel format.

MTLRenderPassColorAttachmentDescriptorArray

MTLRenderPassColorAttachmentDescriptorArray object contains an array of color attachment descriptors.

MTLRenderPassDescriptor

MTLRenderPassDescriptor object contains a collection of attachments that are the rendering destination for pixels generated by a rendering pass.

MTLRenderPipelineColorAttachmentDescriptor

MTLRenderPipelineColorAttachmentDescriptor object defines the configuration of a color attachment associated with a rendering pipeline.

MTLRenderPipelineColorAttachmentDescriptorArray

MTLRenderPipelineColorAttachmentDescriptorArray object contains an array of render pipeline states for an array of color attachments.

MTLRenderPipelineDescriptor

The MTLRenderPipelineDescriptor object specifies the rendering configuration state used during a graphics rendering pass, including rasterization (such as multisampling), visibility, blending, and graphics shader function state.

MTLRenderPipelineReflection

MTLRenderPipelineReflection object provides access to the arguments of a vertex or fragment function of a MTLRenderPipelineState object.

MTLSamplerDescriptor

MTLSamplerDescriptor objects are used to define a specific configuration of a sampler object.

MTLStencilDescriptor

MTLStencilDescriptor object is used to configure a stencil test operation.

MTLStructMember

MTLStructMember is part of the reflection API that allows Metal framework code to query details about an argument of a Metal shading language function.

MTLStructType

MTLStructType is part of the reflection API that allows Metal framework code to query details of a struct that is passed as an argument of a Metal shading language function.

MTLTextureDescriptor

MTLTextureDescriptor object is used to configure new texture objects.

MTLVertexAttribute

MTLVertexAttribute object represents an attribute for per-vertex input in a vertex shader function.

MTLVertexAttributeDescriptor

MTLVertexAttributeDescriptor determines how vertex attribute data is stored in memory and how it is mapped to arguments for a vertex shader function.

MTLVertexAttributeDescriptorArray

MTLVertexAttributeDescriptorArray object is an array of objects that defines how vertex attribute data is formatted and assigned to an index in the attribute argument table.

MTLVertexBufferLayoutDescriptor

MTLVertexBufferLayoutDescriptor object is used to configure how vertex and attribute data are fetched by a vertex shader function.

MTLVertexBufferLayoutDescriptorArray

MTLVertexBufferLayoutDescriptorArray holds an array of vertex buffer layout states.

MTLVertexDescriptor

MTLVertexDescriptor object is used to configure how vertex data stored in memory is mapped to attributes in a vertex shader.

Protocols

MTLBlitCommandEncoder

The MTLBlitCommandEncoder protocol is used to define the interface for objects that can encode resource-copying commands into a frame buffer.

MTLBuffer

The MTLBuffer protocol defines the interface for objects that represent an allocation of unformatted, device-accessible memory that can contain any type of data.

MTLCommandBuffer

The MTLCommandBuffer protocol defines the interface for a transient, single-use object that stores encoded commands that are eventually committed for execution by the GPU.

MTLCommandEncoder

The MTLCommandEncoder protocol defines the common interface for objects that can write commands into a command buffer.

MTLCommandQueue

The MTLCommandQueue protocol defines the interface for an object that can queue an ordered list of command buffers for a Metal device to execute.

MTLComputeCommandEncoder

The MTLComputeCommandEncoder protocol defines the interface for encoding commands that specify the data-parallel compute processing state and execute the compute function.

MTLComputePipelineState

The MTLComputePipelineState protocol defines the interface for a lightweight object used to encode a reference to a compiled compute program.

MTLDepthStencilState

The MTLDepthStencilState protocol defines the interface for a lightweight object used to encode how a graphics rendering pass should perform depth and stencil operations.

MTLDevice

The MTLDevice protocol defines the interface to a single graphics processor (GPU).

MTLDrawable

The MTLDrawable protocol defines the interface for an object that represents a displayable resource that can be used as a destination for rendering commands.

MTLFunction

The MTLFunction protocol defines the interface for an object that represents a single Metal shader function that can be executed by the device as part of a graphics shader or compute function.

MTLLibrary

The MTLLibrary protocol defines the interface for an object that represents a library of Metal shader functions.

MTLParallelRenderCommandEncoder

The MTLParallelRenderCommandEncoder protocol is used to define the interface for objects that can break up a single graphics rendering pass so that it can be encoded from multiple threads simultaneously.

MTLRenderCommandEncoder

The MTLRenderCommandEncoder protocol is used to define the interface for objects that encode graphics rendering state and commands into a command buffer.

MTLRenderPipelineState

The MTLRenderPipelineState protocol defines the interface for a lightweight object used to encode the state for a configured graphics rendering pipeline.

MTLResource

The MTLResource protocol defines the interface for any resource object that represents an allocation of GPU memory.

MTLSamplerState

The MTLSamplerState protocol defines the interface for a lightweight object used to encode how a shader or compute kernel should sample a texture.

MTLTexture

The MTLTexture protocol defines the interface for an object that represents an allocation of formatted image data.

Other Reference

Metal Constants Reference

Metal Data Types Reference

Metal Functions Reference

你可能感兴趣的:(手机游戏,Metal,游戏开发,游戏引擎,引擎开发,图形引擎,iOS)