Overrides to perform your custom operations prior to or after rendering a frame of a composition.
- macOS 10.5–10.15Deprecated
The rendering time, in seconds, of the composition frame.
An optional dictionary that can contain
QCRendererand the associated values. (See
Mouse Location Key
QCRendereror more information.)
false if your custom rendering fails, otherwise,
Do not call this method directly. You override this method only for subclasses of the
QCView class and only if you want to perform custom operations or OpenGL rendering before and/or after Quartz Composer renders a frame of the composition.
The most common reasons to override this method are to:
synchronize communication with the composition. For example, you might want to set input parameters of the composition. By overriding this method, you can set parameters only when necessary and only at a specific time.
underlay or overlay custom OpenGL rendering.
To synchronize communication between a composition and another part of the application, the implementation looks similar to the following:
To perform OpenGL drawing in a
QCView object, follow these guidelines:
Use the OpenGL context of the
QCViewobject to do drawing. You can retrieve the OpenGL context by calling
[self open. Note that this context won't necessarily be set as the current OpenGL context.
Use CGL macros instead of managing the current OpenGL context yourself.
OpenGL performs a global context and renderer lookup for each command it executes to ensure that all OpenGL commands are issued to the correct rendering context and renderer. There is significant overhead associated with these lookups that can measurably affect performance. CGL macros let you provide a local context variable and cache the current renderer in that variable. They are simple to use, taking only a few lines of code to set up.
Save and restore all state changes except the ones that are part of
GL(RGBA color, color index, normal vector, texture coordinates, and so forth).
Check for OpenGL errors with
Here’s an example implementation of this method using OpenGL to draw an overlay: