Type Alias

SCNBindingBlock

The signature for a block called for binding or unbinding a GLSL symbol in a custom program.

Declaration

typedef void (^SCNBindingBlock)(unsigned int programID, unsigned int location, SCNNode *renderedNode, SCNRenderer *renderer);

Discussion

The block takes the following parameters:

programID

The OpenGL program identifier for the current SCNProgram instance, as used by OpenGL functions such as glValidateProgram.

location

The OpenGL location index for the symbol to be bound or unbound, as used by OpenGL functions such as glUniform.

renderedNode

The SCNNode object being rendered.

renderer

The SCNRenderer object responsible for rendering.

Call handleBindingOfSymbol:usingBlock: or handleUnbindingOfSymbol:usingBlock: to associate a handler block with a GLSL symbol for a SceneKit geometry or material.