SCNBindingBlock
The signature for a block called for binding or unbinding a GLSL symbol in a custom program.
Declaration
typealias SCNBindingBlock = (UInt32, UInt32, SCNNode?, SCNRenderer) -> VoidDiscussion
The block takes the following parameters:
programIDThe OpenGL program identifier for the current SCNProgram instance, as used by OpenGL functions such as
glValidateProgram.locationThe OpenGL location index for the symbol to be bound or unbound, as used by OpenGL functions such as
glUniform.renderedNodeThe SCNNode object being rendered.
rendererThe SCNRenderer object responsible for rendering.
Call handleBinding(ofSymbol:handler:) or handleUnbinding(ofSymbol:handler:) to associate a handler block with a GLSL symbol for a SceneKit geometry or material.