v2.0.2
Instance Methods | List of all members
CC3ShaderSemanticsByVarName(DefaultMappings) Category Reference

#import <CC3ShaderSemantics.h>

Instance Methods

(void) - __deprecated
 
(void) - __deprecated
 
(void) - populateWithDefaultVariableNameMappings
 

Detailed Description

This extension to CC3ShaderSemanticsByVarName establishes a Cocos3D default mappings between variable names and semantics.

An application can use the mappings defined in this extension as the basis for its own mappings and add or change a few of its own additional mappings, or an application may ignore this extension and may instead provide its own extensions to populate completely different mappings.

Method Documentation

- (void) __deprecated
Deprecated:
Populates this instance with the default Cocos3D mappings between variable names and semantics that are based on uniforms collected together into structures.

Structure-based mapping provides an organized approach to managing uniform names, but are not compatible with current OSX implementations of GLSL. Current OSX drivers do not handle structure-based uniforms correctly.

If you have developed GLSL shaders under iOS, that use this structure-based approach to uniform naming, you can use this method to populate a semantic mapping that supports this approach. For new iOS applications, and for all OSX applications, you should use the semantic uniform name mappings defined by the populateWithDefaultVariableNameMappings method.

Extends class CC3ShaderSemanticsByVarName.

- (void) __deprecated
Deprecated:
Populates this instance with the default Cocos3D mappings initially included with early versions of Cocos3D 2.0.

These legacy mappings use less efficient uniform mappings, including use of the array-of-structures paradigm. For GLSL under OpenGL ES, each element of each structure in an array of structures is assigned to its own uniform variable for the purpose of managing and populating the uniforms. This can significantly increase the number of actual uniforms, and results in a corresponding increase in the overhead of managing and populating the larger number of uniforms.

It recommended that the array-of-structure approach offered by this method be avoided. It is provided here to provide backwards compatibility for shaders already developed using these legacy mappings.

Extends class CC3ShaderSemanticsByVarName.

- (void) populateWithDefaultVariableNameMappings

Populates this instance with the default Cocos3D mappings between variable names and semantics.

An application wishing to add additional semantic mappings, or override any of the default mappings can invoke this method, and then invoke the mapVarName:toSemantic: or addVariableConfiguration: methods to add or change any of the mappings.

An application wishing to define a completely different semantic mapping may instantiate an instance of this class, will avoid invoking this method, and will typically add its own population methods in a class extension category.

Extends class CC3ShaderSemanticsByVarName.


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