CC3PFXResource Class Reference
Inherits from | CC3Resource : CC3Identifiable : NSObject |
Declared in | CC3PFXResource.h CC3PFXResource.mm |
Overview
CC3PFXResource is a CC3Resource that wraps a PVR PFX data structure loaded from a file. It handles loading object data from PFX files, and creating content from that data. This class is the cornerstone of PFX file management.
Tasks
Other Methods
-
– getEffectNamed:
-
+ getEffectNamed:inPFXResourceNamed:
-
+ getEffectNamed:inPFXResourceFile:
-
semanticDelegateClass
property -
+ defaultSemanticDelegateClass
-
+ setDefaultSemanticDelegateClass:
Other Methods
Properties
semanticDelegateClass
The class used to instantiate the semantic delegate for the GLSL programs created for the PFX effects defined in this PFX resource. The returned class must be a subclass of CC3PFXShaderSemantics.
@property (nonatomic, retain) Class semanticDelegateClass
Discussion
The initial value is set from the class-side defaultSemanticDelegateClass property.
Declared In
CC3PFXResource.h
Class Methods
defaultSemanticDelegateClass
The default class used to instantiate the semantic delegate for the GLSL programs created for the PFX effects defined in instances of this class. The value of this property determines the initial value of the semanticDelegateClass property of any instances. The returned class must be a subclass of CC3PFXShaderSemantics.
+ (Class)defaultSemanticDelegateClass
Discussion
The initial value is the CC3PVRShamanShaderSemantics class.
Declared In
CC3PFXResource.h
getEffectNamed:inPFXResourceFile:
Returns the PFX effect with the specified name, found in the CC3PFXResource loaded from the specfied file. Returns nil if the PFX resource file could not be loaded, or if that PFX resource does not contain an effect with the specified effect name.
+ (CC3PFXEffect *)getEffectNamed:(NSString *)effectName inPFXResourceFile:(NSString *)aFilePath
Declared In
CC3PFXResource.h
getEffectNamed:inPFXResourceNamed:
Returns the PFX effect with the specified name, found in the cached CC3PFXResource with the specifed name. Returns nil if a PFX resource with the specified name cannot be found in the PFX resource cache, or if that PFX resource does not contain an effect with the specified effect name.
+ (CC3PFXEffect *)getEffectNamed:(NSString *)effectName inPFXResourceNamed:(NSString *)rezName
Declared In
CC3PFXResource.h
setDefaultSemanticDelegateClass:
The default class used to instantiate the semantic delegate for the GLSL programs created for the PFX effects defined in instances of this class. The value of this property determines the initial value of the semanticDelegateClass property of any instances. The class must be a subclass of CC3PFXShaderSemantics.
+ (void)setDefaultSemanticDelegateClass:(Class)aClass
Discussion
The initial value is the CC3PVRShamanShaderSemantics class.
Declared In
CC3PFXResource.h
Instance Methods
buildEffectsFromPFXParser:
Builds the effects from the shaders and textures defined in this resource.
- (void)buildEffectsFromPFXParser:(CPVRTPFXParser *)pfxParser
Declared In
CC3PFXResource.mm
buildFromPFXParser:
Build this instance from the contents of the resource.
- (void)buildFromPFXParser:(CPVRTPFXParser *)pfxParser
Declared In
CC3PFXResource.mm
buildRenderPassesFromPFXParser:
Builds the rendering passes.
- (void)buildRenderPassesFromPFXParser:(CPVRTPFXParser *)pfxParser
Discussion
Multi-pass rendering is not currently supported. For now, just log the render passes described by this PFX resource.
Declared In
CC3PFXResource.mm
buildTexturesFromPFXParser:
Extracts the texture definitions and loads them from files.
- (void)buildTexturesFromPFXParser:(CPVRTPFXParser *)pfxParser
Declared In
CC3PFXResource.mm
fullDescription
Returns a string containing a more complete description of this object.
- (NSString *)fullDescription
Discussion
This implementation simply invokes the description method. Subclasses with more substantial content can override to provide much more information.
Declared In
CC3Identifiable.h
getEffectNamed:
Returns the PFX effect with the specified name, or nil if it doesn’t exist.
- (CC3PFXEffect *)getEffectNamed:(NSString *)name
Declared In
CC3PFXResource.h
getTextureNamed:
Returns the texture that was assigned the specified name in the PFX resource file.
- (CC3Texture *)getTextureNamed:(NSString *)texName
Declared In
CC3PFXResource.mm