Public Member Functions | Static Public Member Functions | Properties

CC3OpenGLES11StateTrackerComposite Class Reference

A CC3OpenGLES11StateTracker that tracks a composite value. More...

#import <CC3OpenGLES11StateTracker.h>

Inheritance diagram for CC3OpenGLES11StateTrackerComposite:
Inheritance graph
[legend]
Collaboration diagram for CC3OpenGLES11StateTrackerComposite:
Collaboration graph
[legend]

List of all members.

Public Member Functions

(void) - initializeTrackers

Static Public Member Functions

(CC3GLESStateOriginalValueHandling+ defaultOriginalValueHandling
(BOOL) + defaultShouldAlwaysSetGL

Properties

CC3GLESStateOriginalValueHandling originalValueHandling
BOOL shouldAlwaysSetGL
BOOL shouldRestoreOriginalOnClose
BOOL valueIsKnown
BOOL valueIsKnownOnClose

Detailed Description

A CC3OpenGLES11StateTracker that tracks a composite value.

Composite values track more than one state value, but the values are set in the GL engine with a single GL call.

CC3OpenGLES11StateTrackerComposite is an abstract class. Subclasses will define the values to be tracked. Each individual value will have its own primitive tracker contained within the composite tracker.

Subclasses will also define the method used to set the values.

In general, the composite tracker sets the values in the GL engine (in a single gl* call) only if at least one of the values have changed. This behaviour can be modified by setting the shouldAlwaysSetGL property to YES, in which case, the gl* function will be invoked anytime the values are set, even if none of them have changed.


Member Function Documentation

+ (CC3GLESStateOriginalValueHandling) defaultOriginalValueHandling

The default technique for handling the GL state value as it was before tracking is opened.

See the notes for the CC3GLESStateOriginalValueHandling enumeration for more on handling original GL state.

The default value of this abstract implementation is kCC3GLESStateOriginalValueIgnore. Subclasses will override to establish different defaults.

+ (BOOL) defaultShouldAlwaysSetGL

Default initial value for the shouldAlwaysSetGL property.

This implementation returns NO, indicating that, by default, the composite tracker should only call the GL function if at least one of the component values has changed.

- (void) initializeTrackers

Initializes the component primitive trackers.

Automatically invoked during instance initialization. The application should not invoke this method.


Property Documentation

- (CC3GLESStateOriginalValueHandling) originalValueHandling [read, write, assign]

The type of handling to apply to the value of the GL state at the time the open and close method are invoked.

See the notes for the CC3GLESStateOriginalValueHandling enumeration for more on handling original GL state.

The initial value is set to the value returned by the defaultOriginalValueHandling method. Different subclasses may return different values from the defaultOriginalValueHandling method.

- (BOOL) shouldAlwaysSetGL [read, write, assign]

Indicates whether the tracker should always call the GL function to set the GL values, even if none of the component values have changed.

If this value is NO, if none of the component values has changed, the GL function is not called.

The initial value of this property is set to the value returned by the defaultShouldAlwaysSetGL method.

- (BOOL) shouldRestoreOriginalOnClose [read, assign]

Returns whether the tracker should restore the original value back to the GL engine when this tracker is closed.

Returns YES if the value of the originalValueHandling property is either kCC3GLESStateOriginalValueReadOnceAndRestore or kCC3GLESStateOriginalValueReadAlwaysAndRestore, otherwise returns NO.

- (BOOL) valueIsKnown [read, write, assign]

Indicates whether the current state in the GL engine is known.

- (BOOL) valueIsKnownOnClose [read, assign]

Returns the value to set the valueIsKnown property to when closing this tracker.

Returns NO if the value of the originalValueHandling property is kCC3GLESStateOriginalValueIgnore, otherwise returns YES.


The documentation for this class was generated from the following file: