Public Member Functions | Static Public Member Functions | Properties

CC3OpenGLES11Engine Class Reference

CC3OpenGLES11Engine manages the state of the OpenGL ES 1.1. More...

#import <CC3OpenGLES11Engine.h>

List of all members.

Public Member Functions

(void) - close
(void) - open

Static Public Member Functions

(CC3OpenGLES11Engine *) + engine

Properties

CC3OpenGLES11StateTrackerManagerappExtensions
CC3OpenGLES11ClientCapabilitiesclientCapabilities
CC3OpenGLES11Lightinglighting
CC3OpenGLES11Materialsmaterials
CC3OpenGLES11Matricesmatrices
CC3OpenGLES11Platformplatform
CC3OpenGLES11ServerCapabilitiesserverCapabilities
CC3OpenGLES11Statestate
CC3OpenGLES11Texturestextures
CC3OpenGLES11VertexArraysvertices

Detailed Description

engine.

OpenGL ES 1.1 is designed to be a state machine that operates asynchronously from the application code that calls its functions. Calls to most gl* functions queue up commands to the GL engine that are processed by the GL engine asynchronously from the gl* call.

This design allows GL command execution to be run on a different processor than the application is running on, specifically a hardware-assisted GPU.

To maximize the throughput and performance of this design, it is important that GL state is changed only when necessary, and that querying of the GL state machine is avoided wherever possible.

By routing all GL requests through CC3OpenGLES11Engine, this class can keep track of the GL state change requests made to the GL engine, and will only forward such requests to the GL engine if the state really is changing.

OpenGL defines many functions and state change options. The overall GL functionality covered by CC3OpenGLES11Engine is broken down into the major areas of interest, and each of these areas is managed by a separate tracking manager. Each of these tracking managers is available through a specific property on this CC3OpenGLES11Engine class.

To allow this state tracking to be available and consistently tracked across the complete application, CC3OpenGLES11Engine is implemented as a singleton design pattern. You can access the singleton instance by invoking [CC3OpenGLES11Engine engine] anywhere in your application code.

The two methods open and close define a scope context under which tracking will occur. Once the open method is called, for state tracking to work, ALL OpenGL ES calls that are tracked by the engine MUST be directed through it, until the matching close method is invoked.

The open method is invoked by the CC3World instance when 3D drawing begins, and the close method is invoked by the CC3World instance when 3D drawing ends.

If your application requires access to OpenGL ES 1.1 state or functionality that is not covered by the trackers attached to this engine, you can add that functionality in one of two ways:

  1. Create a subclass of one of the attached tracker managers, add the additional state trackers to that subclass, and replace the existing tracker manager with your enhanced subclass in the appropriate property of the CC3OpenGLES11Engine singleton.
  2. Create a new subclass of CC3OpenGLES11StateTrackerManager, add the additional state trackers to that subclass, and set your enhanced CC3OpenGLES11StateTrackerManager into the appExtensions property, which is nil, unless your application sets a tracker manager there.

Member Function Documentation

- (void) close

Closes tracking of GL state.

All gl* function calls that make changes to GL engine state made between the invocation of the open method and this close method MUST be routed through this CC3OpenGLES11Engine singleton.

+ (CC3OpenGLES11Engine*) engine

Returns the CC3OpenGLES11Engine engine singleton.

- (void) open

Opens tracking of GL state.

All gl* function calls that make changes to GL engine state made between the invocation of this open method and the corresponding close method MUST be routed through this CC3OpenGLES11Engine singleton.


Property Documentation

- (CC3OpenGLES11StateTrackerManager *) appExtensions [read, write, retain]

Most, but not all GL functionality and state is managed by the trackers attached to this CC3OpenGLES11Engine instance.

In the case where your application wishes to track GL state that is not already included in the trackers managed by this instance, you can create a subclass of CC3OpenGLES11StateTrackerManager and set it in this property.

The value of this property is nil, unless an application adds an extension tracker.

- (CC3OpenGLES11ClientCapabilities *) clientCapabilities [read, write, retain]

The state tracking manager that tracks GL client capabilities state.

- (CC3OpenGLES11Lighting *) lighting [read, write, retain]

The state tracking manager that tracks GL lighting state.

- (CC3OpenGLES11Materials *) materials [read, write, retain]

The state tracking manager that tracks GL materials state.

- (CC3OpenGLES11Matrices *) matrices [read, write, retain]

The state tracking manager that tracks GL matrix state.

- (CC3OpenGLES11Platform *) platform [read, write, retain]

The state tracking manager that tracks GL platform functionality state.

- (CC3OpenGLES11ServerCapabilities *) serverCapabilities [read, write, retain]

The state tracking manager that tracks GL server capabilities state.

- (CC3OpenGLES11State *) state [read, write, retain]

The state tracking manager that tracks general GL state.

- (CC3OpenGLES11Textures *) textures [read, write, retain]

The state tracking manager that tracks GL textures state.

- (CC3OpenGLES11VertexArrays *) vertices [read, write, retain]

The state tracking manager that tracks GL vertex array state.


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