iOS Developer Library

Developer

GLKit Framework Reference GLKNamedEffect Protocol Reference

Options
Deployment Target:

On This Page
Language:

GLKNamedEffect

Objects that implement the GLKNamedEffect protocol provide rendering support to shader-based apps. An effect is expected to provide access to one or more shaders. The typical usage pattern for an effect separates initialization tasks from rendering tasks, allowing the effect object to be used efficiently inside an animation loop. More...

Inheritance


Not Applicable

Conforms To


Not Applicable

Import Statement


import GLKit @import GLKit;

Availability


Available in iOS 5.0 and later.
  • Prepares an effect for OpenGL ES rendering. (required)

    Declaration

    Swift

    func prepareToDraw()

    Objective-C

    - (void)prepareToDraw

    Discussion

    An effect binds a compiled shader program to the context and returns. Many effects also bind data to other OpenGL state variables—see the appropriate reference for each effect class.

    Import Statement

    import GLKit

    Availability

    Available in iOS 5.0 and later.