Class MTLRenderCommandEncoder

All Implemented Interfaces:
NSObjectProtocol, MTLCommandEncoder, ObjCProtocol

public final class MTLRenderCommandEncoder
extends NSObject
implements MTLCommandEncoder
  • Constructor Details

    • MTLRenderCommandEncoder

      public MTLRenderCommandEncoder()
  • Method Details

    • getTileWidth

      public long getTileWidth()
      Since:
      Available in iOS 11.0 and later.
    • getTileHeight

      public long getTileHeight()
      Since:
      Available in iOS 11.0 and later.
    • getDevice

      public MTLDevice getDevice()
      Specified by:
      getDevice in interface MTLCommandEncoder
    • getLabel

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

      public void setLabel​(String v)
      Specified by:
      setLabel in interface MTLCommandEncoder
    • setVertexBytes

      public void setVertexBytes​(byte[] bytes, long index)
      Since:
      Available in iOS 8.3 and later.
    • setVertexBuffers

      public void setVertexBuffers​(MTLBuffer[] buffers, long[] offsets, NSRange range)
    • setVertexTextures

      public void setVertexTextures​(MTLTexture[] textures, NSRange range)
    • setVertexSamplerStates

      public void setVertexSamplerStates​(MTLSamplerState[] samplers, NSRange range)
    • setVertexSamplerStates

      public void setVertexSamplerStates​(MTLSamplerState[] samplers, float[] lodMinClamps, float[] lodMaxClamps, NSRange range)
    • setFragmentBytes

      public void setFragmentBytes​(byte[] bytes, long index)
      Since:
      Available in iOS 8.3 and later.
    • setFragmentBuffers

      public void setFragmentBuffers​(MTLBuffer[] buffers, long[] offsets, NSRange range)
    • setFragmentTextures

      public void setFragmentTextures​(MTLTexture[] textures, NSRange range)
    • setFragmentSamplerStates

      public void setFragmentSamplerStates​(MTLSamplerState[] samplers, NSRange range)
    • setFragmentSamplerStates

      public void setFragmentSamplerStates​(MTLSamplerState[] samplers, float[] lodMinClamps, float[] lodMaxClamps, NSRange range)
    • setRenderPipelineState

      public void setRenderPipelineState​(MTLRenderPipelineState pipelineState)
    • setVertexBytes

      protected void setVertexBytes​(long bytes, long length, long index)
      Since:
      Available in iOS 8.3 and later.
    • setVertexBuffer

      public void setVertexBuffer​(MTLBuffer buffer, long offset, long index)
    • setVertexBufferOffset

      public void setVertexBufferOffset​(long offset, long index)
      Since:
      Available in iOS 8.3 and later.
    • setVertexBuffers

      protected void setVertexBuffers​(MTLBuffer.MTLBufferPtr buffers, MachineSizedUIntPtr offsets, NSRange range)
    • setVertexTexture

      public void setVertexTexture​(MTLTexture texture, long index)
    • setVertexTextures

      protected void setVertexTextures​(MTLTexture.MTLTexturePtr textures, NSRange range)
    • setVertexSamplerState

      public void setVertexSamplerState​(MTLSamplerState sampler, long index)
    • setVertexSamplerStates

      protected void setVertexSamplerStates​(MTLSamplerState.MTLSamplerStatePtr samplers, NSRange range)
    • setVertexSamplerState

      public void setVertexSamplerState​(MTLSamplerState sampler, float lodMinClamp, float lodMaxClamp, long index)
    • setVertexSamplerStates

      protected void setVertexSamplerStates​(MTLSamplerState.MTLSamplerStatePtr samplers, FloatPtr lodMinClamps, FloatPtr lodMaxClamps, NSRange range)
    • setVertexVisibleFunctionTable

      public void setVertexVisibleFunctionTable​(MTLVisibleFunctionTable functionTable, long bufferIndex)
      Since:
      Available in iOS 15.0 and later.
    • setVertexVisibleFunctionTables

      public void setVertexVisibleFunctionTables​(MTLVisibleFunctionTable functionTables, NSRange range)
      Since:
      Available in iOS 15.0 and later.
    • setVertexIntersectionFunctionTable

      public void setVertexIntersectionFunctionTable​(MTLIntersectionFunctionTable intersectionFunctionTable, long bufferIndex)
      Since:
      Available in iOS 15.0 and later.
    • setVertexIntersectionFunctionTables

      public void setVertexIntersectionFunctionTables​(MTLIntersectionFunctionTable intersectionFunctionTable, NSRange range)
      Since:
      Available in iOS 15.0 and later.
    • setVertexAccelerationStructure

      public void setVertexAccelerationStructure​(MTLAccelerationStructure accelerationStructure, long bufferIndex)
      Since:
      Available in iOS 15.0 and later.
    • setViewport

      public void setViewport​(MTLViewport viewport)
    • setViewports

      public void setViewports​(MTLViewport viewports, long count)
      Since:
      Available in iOS 12.0 and later.
    • setFrontFacingWinding

      public void setFrontFacingWinding​(MTLWinding frontFacingWinding)
    • setVertexAmplificationCount

      public void setVertexAmplificationCount​(long count, MTLVertexAmplificationViewMapping viewMappings)
      Since:
      Available in iOS 13.0 and later.
    • setCullMode

      public void setCullMode​(MTLCullMode cullMode)
    • setDepthClipMode

      public void setDepthClipMode​(MTLDepthClipMode depthClipMode)
      Since:
      Available in iOS 11.0 and later.
    • setDepthBias

      public void setDepthBias​(float depthBias, float slopeScale, float clamp)
    • setScissorRect

      public void setScissorRect​(MTLScissorRect rect)
    • setScissorRects

      public void setScissorRects​(MTLScissorRect scissorRects, long count)
      Since:
      Available in iOS 12.0 and later.
    • setTriangleFillMode

      public void setTriangleFillMode​(MTLTriangleFillMode fillMode)
    • setFragmentBytes

      protected void setFragmentBytes​(long bytes, long length, long index)
      Since:
      Available in iOS 8.3 and later.
    • setFragmentBuffer

      public void setFragmentBuffer​(MTLBuffer buffer, long offset, long index)
    • setFragmentBufferOffset

      public void setFragmentBufferOffset​(long offset, long index)
      Since:
      Available in iOS 8.3 and later.
    • setFragmentBuffers

      protected void setFragmentBuffers​(MTLBuffer.MTLBufferPtr buffers, MachineSizedUIntPtr offsets, NSRange range)
    • setFragmentTexture

      public void setFragmentTexture​(MTLTexture texture, long index)
    • setFragmentTextures

      protected void setFragmentTextures​(MTLTexture.MTLTexturePtr textures, NSRange range)
    • setFragmentSamplerState

      public void setFragmentSamplerState​(MTLSamplerState sampler, long index)
    • setFragmentSamplerStates

      protected void setFragmentSamplerStates​(MTLSamplerState.MTLSamplerStatePtr samplers, NSRange range)
    • setFragmentSamplerState

      public void setFragmentSamplerState​(MTLSamplerState sampler, float lodMinClamp, float lodMaxClamp, long index)
    • setFragmentSamplerStates

      protected void setFragmentSamplerStates​(MTLSamplerState.MTLSamplerStatePtr samplers, FloatPtr lodMinClamps, FloatPtr lodMaxClamps, NSRange range)
    • setFragmentVisibleFunctionTable

      public void setFragmentVisibleFunctionTable​(MTLVisibleFunctionTable functionTable, long bufferIndex)
      Since:
      Available in iOS 15.0 and later.
    • setFragmentVisibleFunctionTables

      public void setFragmentVisibleFunctionTables​(MTLVisibleFunctionTable functionTables, NSRange range)
      Since:
      Available in iOS 15.0 and later.
    • setFragmentIntersectionFunctionTable

      public void setFragmentIntersectionFunctionTable​(MTLIntersectionFunctionTable intersectionFunctionTable, long bufferIndex)
      Since:
      Available in iOS 15.0 and later.
    • setFragmentIntersectionFunctionTables

      public void setFragmentIntersectionFunctionTables​(MTLIntersectionFunctionTable intersectionFunctionTable, NSRange range)
      Since:
      Available in iOS 15.0 and later.
    • setFragmentAccelerationStructure

      public void setFragmentAccelerationStructure​(MTLAccelerationStructure accelerationStructure, long bufferIndex)
      Since:
      Available in iOS 15.0 and later.
    • setBlendColor

      public void setBlendColor​(float red, float green, float blue, float alpha)
    • setDepthStencilState

      public void setDepthStencilState​(MTLDepthStencilState depthStencilState)
    • setStencilReferenceValue

      public void setStencilReferenceValue​(int referenceValue)
    • setStencilReferenceValue

      public void setStencilReferenceValue​(int frontReferenceValue, int backReferenceValue)
      Since:
      Available in iOS 9.0 and later.
    • setVisibilityResultMode

      public void setVisibilityResultMode​(MTLVisibilityResultMode mode, long offset)
    • setColorStoreAction

      public void setColorStoreAction​(MTLStoreAction storeAction, long colorAttachmentIndex)
      Since:
      Available in iOS 10.0 and later.
    • setDepthStoreAction

      public void setDepthStoreAction​(MTLStoreAction storeAction)
      Since:
      Available in iOS 10.0 and later.
    • setStencilStoreAction

      public void setStencilStoreAction​(MTLStoreAction storeAction)
      Since:
      Available in iOS 10.0 and later.
    • setColorStoreActionOptions

      public void setColorStoreActionOptions​(MTLStoreActionOptions storeActionOptions, long colorAttachmentIndex)
      Since:
      Available in iOS 11.0 and later.
    • setDepthStoreActionOptions

      public void setDepthStoreActionOptions​(MTLStoreActionOptions storeActionOptions)
      Since:
      Available in iOS 11.0 and later.
    • setStencilStoreActionOptions

      public void setStencilStoreActionOptions​(MTLStoreActionOptions storeActionOptions)
      Since:
      Available in iOS 11.0 and later.
    • drawPrimitives

      public void drawPrimitives​(MTLPrimitiveType primitiveType, long vertexStart, long vertexCount, long instanceCount)
    • drawPrimitives

      public void drawPrimitives​(MTLPrimitiveType primitiveType, long vertexStart, long vertexCount)
    • drawIndexedPrimitives

      public void drawIndexedPrimitives​(MTLPrimitiveType primitiveType, long indexCount, MTLIndexType indexType, MTLBuffer indexBuffer, long indexBufferOffset, long instanceCount)
    • drawIndexedPrimitives

      public void drawIndexedPrimitives​(MTLPrimitiveType primitiveType, long indexCount, MTLIndexType indexType, MTLBuffer indexBuffer, long indexBufferOffset)
    • drawPrimitives

      public void drawPrimitives​(MTLPrimitiveType primitiveType, long vertexStart, long vertexCount, long instanceCount, long baseInstance)
      Since:
      Available in iOS 9.0 and later.
    • drawIndexedPrimitives

      public void drawIndexedPrimitives​(MTLPrimitiveType primitiveType, long indexCount, MTLIndexType indexType, MTLBuffer indexBuffer, long indexBufferOffset, long instanceCount, long baseVertex, long baseInstance)
      Since:
      Available in iOS 9.0 and later.
    • drawPrimitives

      public void drawPrimitives​(MTLPrimitiveType primitiveType, MTLBuffer indirectBuffer, long indirectBufferOffset)
      Since:
      Available in iOS 9.0 and later.
    • drawIndexedPrimitives

      public void drawIndexedPrimitives​(MTLPrimitiveType primitiveType, MTLIndexType indexType, MTLBuffer indexBuffer, long indexBufferOffset, MTLBuffer indirectBuffer, long indirectBufferOffset)
      Since:
      Available in iOS 9.0 and later.
    • updateFence

      public void updateFence​(MTLFence fence, MTLRenderStages stages)
      Since:
      Available in iOS 10.0 and later.
    • waitForFence

      public void waitForFence​(MTLFence fence, MTLRenderStages stages)
      Since:
      Available in iOS 10.0 and later.
    • setTessellationFactorBuffer

      public void setTessellationFactorBuffer​(MTLBuffer buffer, long offset, long instanceStride)
      Since:
      Available in iOS 10.0 and later.
    • setTessellationFactorScale

      public void setTessellationFactorScale​(float scale)
      Since:
      Available in iOS 10.0 and later.
    • drawPatches

      public void drawPatches​(long numberOfPatchControlPoints, long patchStart, long patchCount, MTLBuffer patchIndexBuffer, long patchIndexBufferOffset, long instanceCount, long baseInstance)
      Since:
      Available in iOS 10.0 and later.
    • drawPatches

      public void drawPatches​(long numberOfPatchControlPoints, MTLBuffer patchIndexBuffer, long patchIndexBufferOffset, MTLBuffer indirectBuffer, long indirectBufferOffset)
      Since:
      Available in iOS 12.0 and later.
    • drawIndexedPatches

      public void drawIndexedPatches​(long numberOfPatchControlPoints, long patchStart, long patchCount, MTLBuffer patchIndexBuffer, long patchIndexBufferOffset, MTLBuffer controlPointIndexBuffer, long controlPointIndexBufferOffset, long instanceCount, long baseInstance)
      Since:
      Available in iOS 10.0 and later.
    • drawIndexedPatches

      public void drawIndexedPatches​(long numberOfPatchControlPoints, MTLBuffer patchIndexBuffer, long patchIndexBufferOffset, MTLBuffer controlPointIndexBuffer, long controlPointIndexBufferOffset, MTLBuffer indirectBuffer, long indirectBufferOffset)
      Since:
      Available in iOS 12.0 and later.
    • setTileBytes

      public void setTileBytes​(VoidPtr bytes, long length, long index)
      Since:
      Available in iOS 11.0 and later.
    • setTileBuffer

      public void setTileBuffer​(MTLBuffer buffer, long offset, long index)
      Since:
      Available in iOS 11.0 and later.
    • setTileBufferOffset

      public void setTileBufferOffset​(long offset, long index)
      Since:
      Available in iOS 11.0 and later.
    • setTileBuffers

      public void setTileBuffers​(MTLBuffer buffers, MachineSizedUIntPtr offsets, NSRange range)
      Since:
      Available in iOS 11.0 and later.
    • setTileTexture

      public void setTileTexture​(MTLTexture texture, long index)
      Since:
      Available in iOS 11.0 and later.
    • setTileTextures

      public void setTileTextures​(MTLTexture textures, NSRange range)
      Since:
      Available in iOS 11.0 and later.
    • setTileSamplerState

      public void setTileSamplerState​(MTLSamplerState sampler, long index)
      Since:
      Available in iOS 11.0 and later.
    • setTileSamplerStates

      public void setTileSamplerStates​(MTLSamplerState samplers, NSRange range)
      Since:
      Available in iOS 11.0 and later.
    • setTileSamplerState

      public void setTileSamplerState​(MTLSamplerState sampler, float lodMinClamp, float lodMaxClamp, long index)
      Since:
      Available in iOS 11.0 and later.
    • setTileSamplerStates

      public void setTileSamplerStates​(MTLSamplerState samplers, FloatPtr lodMinClamps, FloatPtr lodMaxClamps, NSRange range)
      Since:
      Available in iOS 11.0 and later.
    • setTileVisibleFunctionTable

      public void setTileVisibleFunctionTable​(MTLVisibleFunctionTable functionTable, long bufferIndex)
      Since:
      Available in iOS 15.0 and later.
    • setTileVisibleFunctionTables

      public void setTileVisibleFunctionTables​(MTLVisibleFunctionTable functionTables, NSRange range)
      Since:
      Available in iOS 15.0 and later.
    • setTileIntersectionFunctionTable

      public void setTileIntersectionFunctionTable​(MTLIntersectionFunctionTable intersectionFunctionTable, long bufferIndex)
      Since:
      Available in iOS 15.0 and later.
    • setTileIntersectionFunctionTables

      public void setTileIntersectionFunctionTables​(MTLIntersectionFunctionTable intersectionFunctionTable, NSRange range)
      Since:
      Available in iOS 15.0 and later.
    • setTileAccelerationStructure

      public void setTileAccelerationStructure​(MTLAccelerationStructure accelerationStructure, long bufferIndex)
      Since:
      Available in iOS 15.0 and later.
    • dispatchThreadsPerTile

      public void dispatchThreadsPerTile​(MTLSize threadsPerTile)
      Since:
      Available in iOS 11.0 and later.
    • setThreadgroupMemoryLength

      public void setThreadgroupMemoryLength​(long length, long offset, long index)
      Since:
      Available in iOS 11.0 and later.
    • useResource

      public void useResource​(MTLResource resource, MTLResourceUsage usage)
      Since:
      Available in iOS 11.0 and later.
    • useResources

      public void useResources​(MTLResource resources, long count, MTLResourceUsage usage)
      Since:
      Available in iOS 11.0 and later.
    • useResource

      public void useResource​(MTLResource resource, MTLResourceUsage usage, MTLRenderStages stages)
      Since:
      Available in iOS 13.0 and later.
    • useResources

      public void useResources​(MTLResource resources, long count, MTLResourceUsage usage, MTLRenderStages stages)
      Since:
      Available in iOS 13.0 and later.
    • useHeap

      public void useHeap​(MTLHeap heap)
      Since:
      Available in iOS 11.0 and later.
    • useHeaps

      public void useHeaps​(MTLHeap heaps, long count)
      Since:
      Available in iOS 11.0 and later.
    • useHeap

      public void useHeap​(MTLHeap heap, MTLRenderStages stages)
      Since:
      Available in iOS 13.0 and later.
    • useHeaps

      public void useHeaps​(MTLHeap heaps, long count, MTLRenderStages stages)
      Since:
      Available in iOS 13.0 and later.
    • executeCommandsInBuffer

      public void executeCommandsInBuffer​(MTLIndirectCommandBuffer indirectCommandBuffer, NSRange executionRange)
      Since:
      Available in iOS 12.0 and later.
    • executeCommandsInBuffer

      public void executeCommandsInBuffer​(MTLIndirectCommandBuffer indirectCommandbuffer, MTLBuffer indirectRangeBuffer, long indirectBufferOffset)
      Since:
      Available in iOS 13.0 and later.
    • sampleCountersInBuffer

      public void sampleCountersInBuffer​(MTLCounterSampleBuffer sampleBuffer, long sampleIndex, boolean barrier)
      Since:
      Available in iOS 14.0 and later.
    • endEncoding

      public void endEncoding()
      Specified by:
      endEncoding in interface MTLCommandEncoder
    • insertDebugSignpost

      public void insertDebugSignpost​(String string)
      Specified by:
      insertDebugSignpost in interface MTLCommandEncoder
    • pushDebugGroup

      public void pushDebugGroup​(String string)
      Specified by:
      pushDebugGroup in interface MTLCommandEncoder
    • popDebugGroup

      public void popDebugGroup()
      Specified by:
      popDebugGroup in interface MTLCommandEncoder