Class SKRenderer

  • All Implemented Interfaces:
    NSObject

    public class SKRenderer
    extends NSObject
    A renderer for displaying a SpriteKit scene in an existing Metal workflow.
    • Constructor Detail

      • SKRenderer

        protected SKRenderer​(org.moe.natj.general.Pointer peer)
    • Method Detail

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • allocWithZone

        public static java.lang.Object allocWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
      • automaticallyNotifiesObserversForKey

        public static boolean automaticallyNotifiesObserversForKey​(java.lang.String key)
      • cancelPreviousPerformRequestsWithTarget

        public static void cancelPreviousPerformRequestsWithTarget​(java.lang.Object aTarget)
      • cancelPreviousPerformRequestsWithTargetSelectorObject

        public static void cancelPreviousPerformRequestsWithTargetSelectorObject​(java.lang.Object aTarget,
                                                                                 org.moe.natj.objc.SEL aSelector,
                                                                                 java.lang.Object anArgument)
      • classFallbacksForKeyedArchiver

        public static NSArray<java.lang.String> classFallbacksForKeyedArchiver()
      • classForKeyedUnarchiver

        public static org.moe.natj.objc.Class classForKeyedUnarchiver()
      • debugDescription_static

        public static java.lang.String debugDescription_static()
      • description_static

        public static java.lang.String description_static()
      • hash_static

        public static long hash_static()
      • ignoresSiblingOrder

        public boolean ignoresSiblingOrder()
        Ignores sibling and traversal order to sort the rendered contents of a scene into the most efficient batching possible. This will require zPosition to be used in the scenes to properly guarantee elements are in front or behind each other. This defaults to NO, meaning that sibling order overrides efficiency heuristics in the rendering of the scenes in the view. Setting this to YES for a complex scene may substantially increase performance, but care must be taken as only zPosition determines render order before the efficiency heuristics are used.
      • instanceMethodSignatureForSelector

        public static NSMethodSignature instanceMethodSignatureForSelector​(org.moe.natj.objc.SEL aSelector)
      • instancesRespondToSelector

        public static boolean instancesRespondToSelector​(org.moe.natj.objc.SEL aSelector)
      • isSubclassOfClass

        public static boolean isSubclassOfClass​(org.moe.natj.objc.Class aClass)
      • keyPathsForValuesAffectingValueForKey

        public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey​(java.lang.String key)
      • new_objc

        public static java.lang.Object new_objc()
      • renderWithViewportCommandBufferRenderPassDescriptor

        public void renderWithViewportCommandBufferRenderPassDescriptor​(CGRect viewport,
                                                                        MTLCommandBuffer commandBuffer,
                                                                        MTLRenderPassDescriptor renderPassDescriptor)
        Render the scene content in the specified Metal command buffer.
        Parameters:
        viewport - The pixel dimensions in which to render.
        commandBuffer - The Metal command buffer in which SpriteKit should schedule rendering commands.
        renderPassDescriptor - The Metal render pass descriptor describing the rendering target.
      • renderWithViewportRenderCommandEncoderRenderPassDescriptorCommandQueue

        public void renderWithViewportRenderCommandEncoderRenderPassDescriptorCommandQueue​(CGRect viewport,
                                                                                           MTLRenderCommandEncoder renderCommandEncoder,
                                                                                           MTLRenderPassDescriptor renderPassDescriptor,
                                                                                           MTLCommandQueue commandQueue)
        Render the scene content using a specific Metal command encoder.
        Parameters:
        viewport - The pixel dimensions in which to render.
        renderCommandEncoder - The Metal render command encoder that SpriteKit will use to encode rendering commands. This method will not call endEncoding.
        renderPassDescriptor - The Metal render pass descriptor describing the rendering target.
        commandQueue - The Metal command queue.
      • rendererWithDevice

        public static SKRenderer rendererWithDevice​(MTLDevice device)
        Creates a renderer with the specified Metal device.
        Parameters:
        device - A Metal device.
        Returns:
        A new renderer object.
      • resolveClassMethod

        public static boolean resolveClassMethod​(org.moe.natj.objc.SEL sel)
      • resolveInstanceMethod

        public static boolean resolveInstanceMethod​(org.moe.natj.objc.SEL sel)
      • scene

        public SKScene scene()
        The currently presented scene, otherwise nil. If in a transition, the 'incoming' scene is returned.
      • setIgnoresSiblingOrder

        public void setIgnoresSiblingOrder​(boolean value)
        Ignores sibling and traversal order to sort the rendered contents of a scene into the most efficient batching possible. This will require zPosition to be used in the scenes to properly guarantee elements are in front or behind each other. This defaults to NO, meaning that sibling order overrides efficiency heuristics in the rendering of the scenes in the view. Setting this to YES for a complex scene may substantially increase performance, but care must be taken as only zPosition determines render order before the efficiency heuristics are used.
      • setScene

        public void setScene​(SKScene value)
        The currently presented scene, otherwise nil. If in a transition, the 'incoming' scene is returned.
      • setShouldCullNonVisibleNodes

        public void setShouldCullNonVisibleNodes​(boolean value)
        A boolean that indicated whether non-visible nodes should be automatically culled when rendering.
      • setShowsDrawCount

        public void setShowsDrawCount​(boolean value)
        Toggles display of performance stats when rendering. All default to false.
      • setShowsFields

        public void setShowsFields​(boolean value)
      • setShowsNodeCount

        public void setShowsNodeCount​(boolean value)
      • setShowsPhysics

        public void setShowsPhysics​(boolean value)
      • setShowsQuadCount

        public void setShowsQuadCount​(boolean value)
      • setVersion_static

        public static void setVersion_static​(long aVersion)
      • shouldCullNonVisibleNodes

        public boolean shouldCullNonVisibleNodes()
        A boolean that indicated whether non-visible nodes should be automatically culled when rendering.
      • showsDrawCount

        public boolean showsDrawCount()
        Toggles display of performance stats when rendering. All default to false.
      • showsFields

        public boolean showsFields()
      • showsNodeCount

        public boolean showsNodeCount()
      • showsPhysics

        public boolean showsPhysics()
      • showsQuadCount

        public boolean showsQuadCount()
      • superclass_static

        public static org.moe.natj.objc.Class superclass_static()
      • updateAtTime

        public void updateAtTime​(double currentTime)
        Update the scene at the specified system time.
        Parameters:
        currentTime - The timestamp in seconds.
      • version_static

        public static long version_static()