Interface MTKViewDelegate


  • public interface MTKViewDelegate
    MTKViewDelegate Allows an object to render into the view and respond to resize events
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void drawInMTKView​(MTKView view)
      drawInMTKView: Called on the delegate when it is asked to render into the view Called on the delegate when it is asked to render into the view
      void mtkViewDrawableSizeWillChange​(MTKView view, CGSize size)
      mtkView:drawableSizeWillChange: Called whenever the drawableSize of the view will change Delegate can recompute view and projection matricies or regenerate any buffers to be compatible with the new view size or resolution
    • Method Detail

      • drawInMTKView

        void drawInMTKView​(MTKView view)
        drawInMTKView: Called on the delegate when it is asked to render into the view Called on the delegate when it is asked to render into the view
      • mtkViewDrawableSizeWillChange

        void mtkViewDrawableSizeWillChange​(MTKView view,
                                           CGSize size)
        mtkView:drawableSizeWillChange: Called whenever the drawableSize of the view will change Delegate can recompute view and projection matricies or regenerate any buffers to be compatible with the new view size or resolution
        Parameters:
        view - MTKView which called this method
        size - New drawable size in pixels