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:
CC3OpenGLES11StateTracker CC3OpenGLES11StateTrackerMaterialBlend CC3OpenGLES11StateTrackerVertexPointer CC3OpenGLES11StateTrackerVertexColorsPointer CC3OpenGLES11StateTrackerVertexLocationsPointer CC3OpenGLES11StateTrackerVertexNormalsPointer CC3OpenGLES11StateTrackerVertexPointSizesPointer CC3OpenGLES11StateTrackerVertexTexCoordsPointer

List of all members.

Public Member Functions

(void) - initializeTrackers
(void) - restoreOriginalValue

Static Public Member Functions

(CC3GLESStateOriginalValueHandling+ defaultOriginalValueHandling
(BOOL) + defaultShouldAlwaysSetGL

Properties

CC3GLESStateOriginalValueHandling originalValueHandling
BOOL shouldAlwaysSetGL
BOOL valueIsKnown

Detailed Description

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.

- (void) restoreOriginalValue

Template method that sets the current values of the GL state back to the original values.

The values will only be propagated to the GL engine if at least one of the original values is different than the current GL values, or if the current value in the GL engine is unknown, or if the shouldAlwaysSetGL property is set to YES.

This abstract implementation does nothing. Subclasses will override to set the value using the appropriate variable types.

The application should not invoke this method directly.


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) valueIsKnown [read, write, assign]

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


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