CARenderer Class Reference
| Inherits from | |
| Conforms to | |
| Framework | /System/Library/Frameworks/QuartzCore.framework |
| Availability | Available in OS X v10.5 and later. |
| Declared in | CARenderer.h |
| Companion guides |
Overview
CARenderer allows an application to render a layer tree into a CGL context. For real-time output you should use an instance of NSView to host the layer-tree.
Tasks
Rendered Layer
-
layerproperty
Renderer Geometry
-
boundsproperty
Create a New Renderer
Render a Frame
Properties
bounds
The bounds of the receiver.
Availability
- Available in OS X v10.5 and later.
Declared In
CARenderer.hlayer
The root layer of the layer-tree the receiver should render.
Availability
- Available in OS X v10.5 and later.
Declared In
CARenderer.hClass Methods
rendererWithCGLContext:options:
Creates and returns a CARenderer instance with the render target specified by the Core OpenGL context.
Parameters
- ctx
A Core OpenGL render context that is used as the render target.
- dict
A dictionary of optional parameters.
Return Value
A new instance of CARenderer that will use ctx as the render target.
Availability
- Available in OS X v10.5 and later.
Declared In
CARenderer.hInstance Methods
addUpdateRect:
Adds the rectangle to the update region of the current frame.
Parameters
- aRect
A rectangle defining the region to be added to the update region.
Availability
- Available in OS X v10.5 and later.
Declared In
CARenderer.hbeginFrameAtTime:timeStamp:
Begin rendering a frame at the specified time.
Parameters
- timeInterval
The layer time.
- timeStamp
The display timestamp associated with timeInterval. Can be null.
Availability
- Available in OS X v10.5 and later.
Declared In
CARenderer.hendFrame
Release any data associated with the current frame.
Availability
- Available in OS X v10.5 and later.
Declared In
CARenderer.hnextFrameTime
Returns the time at which the next update should happen.
Return Value
The time at which the next update should happen.
Discussion
If infinite, no update needs to be scheduled yet. If nextFrameTime is the current frame time, a continuous animation is running and an update should be scheduled after an appropriate delay.
Availability
- Available in OS X v10.5 and later.
Declared In
CARenderer.hrender
Render the update region of the current frame to the target context.
Availability
- Available in OS X v10.5 and later.
Declared In
CARenderer.hupdateBounds
Returns the bounds of the update region that contains all pixels that will be rendered by the current frame.
Return Value
The bounds of the update region..
Discussion
Initially updateBounds will include all differences between the current frame and the previously rendered frame.
Availability
- Available in OS X v10.5 and later.
Declared In
CARenderer.h© 2008 Apple Inc. All Rights Reserved. (Last updated: 2008-04-30)