Interface MTLArgumentEncoder


  • public interface MTLArgumentEncoder
    [@protocol] MTLArgumentEncoder MTLArgumentEncoder encodes buffer, texture, sampler, and constant data into a buffer.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      long alignment()
      [@property] alignment The alignment in bytes required to store the encoded resource bindings.
      org.moe.natj.general.ptr.VoidPtr constantDataAtIndex​(long index)
      constantDataAtIndex: Returns a pointer to the constant data at the given bind point index.
      MTLDevice device()
      [@property] device The device this argument encoder was created against.
      long encodedLength()
      [@property] encodedLength The number of bytes required to store the encoded resource bindings.
      java.lang.String label()
      [@property] label A string to help identify this object.
      MTLArgumentEncoder newArgumentEncoderForBufferAtIndex​(long index)
      newArgumentEncoderForBufferAtIndex: Returns a pointer to a new MTLArgumentEncoder that can be used to encode the an argument buffer in the buffer associated with a given index.
      void setAccelerationStructureAtIndex​(MTLAccelerationStructure accelerationStructure, long index)  
      void setArgumentBufferOffset​(MTLBuffer argumentBuffer, long offset)
      setArgumentBuffer:offset: Sets the destination buffer and offset at which the arguments will be encoded.
      void setArgumentBufferStartOffsetArrayElement​(MTLBuffer argumentBuffer, long startOffset, long arrayElement)
      * @method setArgumentBuffer:offset:arrayElement: * @brief Sets the destination buffer, starting offset and specific array element arguments will be encoded into. arrayElement represents the desired element of IAB array targetted by encoding
      void setBufferOffsetAtIndex​(MTLBuffer buffer, long offset, long index)
      setBuffer:offset:atIndex: Set a buffer at the given bind point index.
      void setBuffersOffsetsWithRange​(org.moe.natj.general.ptr.Ptr<org.moe.natj.objc.ObjCObject> buffers, org.moe.natj.general.ptr.ConstNUIntPtr offsets, NSRange range)
      setBuffers:offsets:withRange: Set an array of buffers at the given bind point index range.
      void setComputePipelineStateAtIndex​(MTLComputePipelineState pipeline, long index)
      setComputePipelineState:atIndex Sets a compute pipeline state at a given bind point index
      void setComputePipelineStatesWithRange​(org.moe.natj.general.ptr.Ptr<org.moe.natj.objc.ObjCObject> pipelines, NSRange range)
      setComputePipelineStates:withRange Set an array of compute pipeline states at a given bind point index range
      void setIndirectCommandBufferAtIndex​(MTLIndirectCommandBuffer indirectCommandBuffer, long index)
      setIndirectCommandBuffer:atIndex Sets an indirect command buffer at a given bind point index
      void setIndirectCommandBuffersWithRange​(org.moe.natj.general.ptr.Ptr<org.moe.natj.objc.ObjCObject> buffers, NSRange range)
      setIndirectCommandBuffers:withRange: Set an array of indirect command buffers at the given bind point index range.
      void setIntersectionFunctionTableAtIndex​(MTLIntersectionFunctionTable intersectionFunctionTable, long index)
      setIntersectionFunctionTable:atIndex: Set an intersection function table at the given buffer index
      void setIntersectionFunctionTablesWithRange​(org.moe.natj.general.ptr.Ptr<org.moe.natj.objc.ObjCObject> intersectionFunctionTables, NSRange range)
      setIntersectionFunctionTables:withRange: Set intersection function tables at the given buffer index range
      void setLabel​(java.lang.String value)
      [@property] label A string to help identify this object.
      void setRenderPipelineStateAtIndex​(MTLRenderPipelineState pipeline, long index)
      setRenderPipelineState:atIndex Sets a render pipeline state at a given bind point index
      void setRenderPipelineStatesWithRange​(org.moe.natj.general.ptr.Ptr<org.moe.natj.objc.ObjCObject> pipelines, NSRange range)
      setRenderPipelineStates:withRange Set an array of render pipeline states at a given bind point index range
      void setSamplerStateAtIndex​(MTLSamplerState sampler, long index)
      setSamplerState:atIndex: Set a sampler at the given bind point index.
      void setSamplerStatesWithRange​(org.moe.natj.general.ptr.Ptr<org.moe.natj.objc.ObjCObject> samplers, NSRange range)
      setSamplerStates:withRange: Set an array of samplers at the given bind point index range.
      void setTextureAtIndex​(MTLTexture texture, long index)
      setTexture:atIndex: Set a texture at the given bind point index.
      void setTexturesWithRange​(org.moe.natj.general.ptr.Ptr<org.moe.natj.objc.ObjCObject> textures, NSRange range)
      setTextures:withRange: Set an array of textures at the given bind point index range.
      void setVisibleFunctionTableAtIndex​(MTLVisibleFunctionTable visibleFunctionTable, long index)
      setVisibleFunctionTable:atIndex: Set a visible function table at the given buffer index
      void setVisibleFunctionTablesWithRange​(org.moe.natj.general.ptr.Ptr<org.moe.natj.objc.ObjCObject> visibleFunctionTables, NSRange range)
      setVisibleFunctionTables:withRange: Set visible function tables at the given buffer index range
    • Method Detail

      • alignment

        long alignment()
        [@property] alignment The alignment in bytes required to store the encoded resource bindings.
      • constantDataAtIndex

        org.moe.natj.general.ptr.VoidPtr constantDataAtIndex​(long index)
        constantDataAtIndex: Returns a pointer to the constant data at the given bind point index.
      • device

        MTLDevice device()
        [@property] device The device this argument encoder was created against.
      • encodedLength

        long encodedLength()
        [@property] encodedLength The number of bytes required to store the encoded resource bindings.
      • label

        java.lang.String label()
        [@property] label A string to help identify this object.
      • setArgumentBufferOffset

        void setArgumentBufferOffset​(MTLBuffer argumentBuffer,
                                     long offset)
        setArgumentBuffer:offset: Sets the destination buffer and offset at which the arguments will be encoded.
      • setArgumentBufferStartOffsetArrayElement

        void setArgumentBufferStartOffsetArrayElement​(MTLBuffer argumentBuffer,
                                                      long startOffset,
                                                      long arrayElement)
        * @method setArgumentBuffer:offset:arrayElement: * @brief Sets the destination buffer, starting offset and specific array element arguments will be encoded into. arrayElement represents the desired element of IAB array targetted by encoding
      • setBufferOffsetAtIndex

        void setBufferOffsetAtIndex​(MTLBuffer buffer,
                                    long offset,
                                    long index)
        setBuffer:offset:atIndex: Set a buffer at the given bind point index.
      • setBuffersOffsetsWithRange

        void setBuffersOffsetsWithRange​(org.moe.natj.general.ptr.Ptr<org.moe.natj.objc.ObjCObject> buffers,
                                        org.moe.natj.general.ptr.ConstNUIntPtr offsets,
                                        NSRange range)
        setBuffers:offsets:withRange: Set an array of buffers at the given bind point index range.
      • setLabel

        void setLabel​(java.lang.String value)
        [@property] label A string to help identify this object.
      • setSamplerStateAtIndex

        void setSamplerStateAtIndex​(MTLSamplerState sampler,
                                    long index)
        setSamplerState:atIndex: Set a sampler at the given bind point index.
      • setSamplerStatesWithRange

        void setSamplerStatesWithRange​(org.moe.natj.general.ptr.Ptr<org.moe.natj.objc.ObjCObject> samplers,
                                       NSRange range)
        setSamplerStates:withRange: Set an array of samplers at the given bind point index range.
      • setTextureAtIndex

        void setTextureAtIndex​(MTLTexture texture,
                               long index)
        setTexture:atIndex: Set a texture at the given bind point index.
      • setTexturesWithRange

        void setTexturesWithRange​(org.moe.natj.general.ptr.Ptr<org.moe.natj.objc.ObjCObject> textures,
                                  NSRange range)
        setTextures:withRange: Set an array of textures at the given bind point index range.
      • newArgumentEncoderForBufferAtIndex

        MTLArgumentEncoder newArgumentEncoderForBufferAtIndex​(long index)
        newArgumentEncoderForBufferAtIndex: Returns a pointer to a new MTLArgumentEncoder that can be used to encode the an argument buffer in the buffer associated with a given index. Returns nil if the resource at the given index is not an argument buffer.
      • setComputePipelineStateAtIndex

        void setComputePipelineStateAtIndex​(MTLComputePipelineState pipeline,
                                            long index)
        setComputePipelineState:atIndex Sets a compute pipeline state at a given bind point index
      • setComputePipelineStatesWithRange

        void setComputePipelineStatesWithRange​(org.moe.natj.general.ptr.Ptr<org.moe.natj.objc.ObjCObject> pipelines,
                                               NSRange range)
        setComputePipelineStates:withRange Set an array of compute pipeline states at a given bind point index range
      • setIndirectCommandBufferAtIndex

        void setIndirectCommandBufferAtIndex​(MTLIndirectCommandBuffer indirectCommandBuffer,
                                             long index)
        setIndirectCommandBuffer:atIndex Sets an indirect command buffer at a given bind point index
      • setIndirectCommandBuffersWithRange

        void setIndirectCommandBuffersWithRange​(org.moe.natj.general.ptr.Ptr<org.moe.natj.objc.ObjCObject> buffers,
                                                NSRange range)
        setIndirectCommandBuffers:withRange: Set an array of indirect command buffers at the given bind point index range.
      • setRenderPipelineStateAtIndex

        void setRenderPipelineStateAtIndex​(MTLRenderPipelineState pipeline,
                                           long index)
        setRenderPipelineState:atIndex Sets a render pipeline state at a given bind point index
      • setRenderPipelineStatesWithRange

        void setRenderPipelineStatesWithRange​(org.moe.natj.general.ptr.Ptr<org.moe.natj.objc.ObjCObject> pipelines,
                                              NSRange range)
        setRenderPipelineStates:withRange Set an array of render pipeline states at a given bind point index range
      • setAccelerationStructureAtIndex

        void setAccelerationStructureAtIndex​(MTLAccelerationStructure accelerationStructure,
                                             long index)
      • setIntersectionFunctionTableAtIndex

        void setIntersectionFunctionTableAtIndex​(MTLIntersectionFunctionTable intersectionFunctionTable,
                                                 long index)
        setIntersectionFunctionTable:atIndex: Set an intersection function table at the given buffer index
      • setIntersectionFunctionTablesWithRange

        void setIntersectionFunctionTablesWithRange​(org.moe.natj.general.ptr.Ptr<org.moe.natj.objc.ObjCObject> intersectionFunctionTables,
                                                    NSRange range)
        setIntersectionFunctionTables:withRange: Set intersection function tables at the given buffer index range
      • setVisibleFunctionTableAtIndex

        void setVisibleFunctionTableAtIndex​(MTLVisibleFunctionTable visibleFunctionTable,
                                            long index)
        setVisibleFunctionTable:atIndex: Set a visible function table at the given buffer index
      • setVisibleFunctionTablesWithRange

        void setVisibleFunctionTablesWithRange​(org.moe.natj.general.ptr.Ptr<org.moe.natj.objc.ObjCObject> visibleFunctionTables,
                                               NSRange range)
        setVisibleFunctionTables:withRange: Set visible function tables at the given buffer index range