Prepares an effect for rendering.
- iOS 5.0+
- macOS 10.8+
- tvOS 9.0+
An effect must be prepared after it is configured and again when your application wants to use the effect to render any primitives. When your application prepares an effect, some OpenGL state is altered to allow the effect to operate:
GL_CURRENT_PROGRAMstate is always changed to point to the shader provided by the effect object.
When texturing is enabled, the
GL_TEXTURE_BINDING_2Dstate may also change.
If your application requires the previous state to be saved before the effect alters them, it must explicitly save and restore the values.