0 Replies
      Latest reply on Nov 27, 2015 4:00 AM by Carniphage
      Carniphage Level 1 Level 1 (15 points)

        The SceneKit SCNTechnique will call-back a block allowing an app to supply custom data to an OpenGL Shader.

         

        for example

             technique.handleBindingOfSymbol("prevMvp"){
                                programID, location, renderedNode, renderer in
                                print("nodeName \(renderedNode.name)")
                                let m = renderedNode.transform
                                ...
        

         

        The block must conform to.

         

        public typealias SCNBindingBlock = (UInt32, UInt32, SCNNode, SCNRenderer) -> Void
        

         

        But my block is being called with renderedNode pointing at 0x00000  

        This is not an optional.  It should not be zero.
        The node reference is invalid.  The SCNRenderer (and the other parameters) are correct.