Inherits from NSObject
Declared in CC3PFXResource.h
CC3PFXResource.mm

Overview

CC3PFXEffect represents a single effect within a PFX resource file. It combines the shader code referenced by the effect into a CC3ShaderProgram, and the textures to apply to the material.

Properties

name

Returns the name of this effect.

@property (nonatomic, retain, readonly) NSString *name

Declared In

CC3PFXResource.h

shaderProgram

The shader program used to render this effect.

@property (nonatomic, retain, readonly) CC3ShaderProgram *shaderProgram

Declared In

CC3PFXResource.h

textures

The textures used in this effect. Each element of this array is an instance of CC3PFXEffectTexture that contains the texture and the index of the texture unit to which the texture should be applied.

@property (nonatomic, retain, readonly) NSArray *textures

Declared In

CC3PFXResource.h

variables

This array contains a configuration spec for each attribute and uniform variable used in the shaders. Each element of this array is an instance of CC3PFXGLSLVariableConfiguration.

@property (nonatomic, retain, readonly) NSArray *variables

Declared In

CC3PFXResource.h

Instance Methods

addVariablesFrom:

Adds a variable configuration for each semantic spec in the specified array.

- (void)addVariablesFrom:(CPVRTArray<SPVRTPFXParserSemantic>)pfxVariables

Declared In

CC3PFXResource.mm

dealloc

- (void)dealloc

description

Returns a string description of this effect.

- (NSString *)description

Declared In

CC3PFXResource.mm

getEffectTextureForTextureUnit:

Returns the effect texture to be applied to the specified texture unit, or nil if no texture is defined for that texture unit.

- (CC3PFXEffectTexture *)getEffectTextureForTextureUnit:(GLuint)tuIdx

Declared In

CC3PFXResource.mm

getPFXFragmentShaderForPFXEffect:fromPFXParser:

Returns the PFX fragment shader that was assigned the specified name in the PFX resource file.

- (SPVRTPFXParserShader *)getPFXFragmentShaderForPFXEffect:(SPVRTPFXParserEffect *)pfxEffect fromPFXParser:(CPVRTPFXParser *)pfxParser

Declared In

CC3PFXResource.mm

getPFXVertexShaderForPFXEffect:fromPFXParser:

Returns the PFX vertex shader that was assigned the specified name in the PFX resource file.

- (SPVRTPFXParserShader *)getPFXVertexShaderForPFXEffect:(SPVRTPFXParserEffect *)pfxEffect fromPFXParser:(CPVRTPFXParser *)pfxParser

Declared In

CC3PFXResource.mm

getShaderCode:

Returns the shader code for the specified shader.

- (GLchar *)getShaderCode:(SPVRTPFXParserShader *)pfxShader

Declared In

CC3PFXResource.mm

initFromSPVRTPFXParserEffect:fromPFXParser:inPFXResource:

Initializes this instance from the specified SPVRTPFXParserEffect C++ class, retrieved from the specified CPVRTPFXParser C++ class as loaded from the specfied PFX resource.

- (id)initFromSPVRTPFXParserEffect:(PFXClassPtr)pSPVRTPFXParserEffect fromPFXParser:(PFXClassPtr)pCPVRTPFXParser inPFXResource:(CC3PFXResource *)pfxRez

Declared In

CC3PFXResource.h

initShaderProgramForPFXEffect:fromPFXParser:inPFXResource:

Initializes the CC3ShaderProgram built from the shaders defined for this effect.

- (void)initShaderProgramForPFXEffect:(SPVRTPFXParserEffect *)pfxEffect fromPFXParser:(CPVRTPFXParser *)pfxParser inPFXResource:(CC3PFXResource *)pfxRez

Declared In

CC3PFXResource.mm

initTexturesForPFXEffect:fromPFXParser:inPFXResource:

Initializes the effect textures in the textures property.

- (void)initTexturesForPFXEffect:(SPVRTPFXParserEffect *)pfxEffect fromPFXParser:(CPVRTPFXParser *)pfxParser inPFXResource:(CC3PFXResource *)pfxRez

Declared In

CC3PFXResource.mm

initVariablesForPFXEffect:fromPFXParser:inPFXResource:

Initializes the variables configurations in the variables property.

- (void)initVariablesForPFXEffect:(SPVRTPFXParserEffect *)pfxEffect fromPFXParser:(CPVRTPFXParser *)pfxParser inPFXResource:(CC3PFXResource *)pfxRez

Declared In

CC3PFXResource.mm

populateMaterial:

Populates the specfied material with the textures in this effect.

- (void)populateMaterial:(CC3Material *)material

Declared In

CC3PFXResource.h

populateMeshNode:

Populates the specfied mesh node with the shader program in this effect.

- (void)populateMeshNode:(CC3MeshNode *)meshNode

Declared In

CC3PFXResource.h

semanticDelegateFrom:fromPFXParser:inPFXResource:

Template method to create, populate, and return the semantic delegate to use in the GL program.

- (CC3PFXShaderSemantics *)semanticDelegateFrom:(SPVRTPFXParserEffect *)pfxEffect fromPFXParser:(CPVRTPFXParser *)pfxParser inPFXResource:(CC3PFXResource *)pfxRez

Declared In

CC3PFXResource.mm

shaderProgramClass

Template property to determine the class of shader program to instantiate. The returned class must be a subclass of CC3ShaderProgram.

- (Class)shaderProgramClass

Declared In

CC3PFXResource.mm