#import <CC3PFXResource.h>
Class Methods | |
(id) | + shaderFromPFXShader:inPFXResource: |
Extension to support PFX effects.
+ (id) shaderFromPFXShader: | (PFXClassPtr) | pSPVRTPFXParserShader | |
inPFXResource: | (CC3PFXResource *) | pfxRez | |
Returns an instance compiled from GLSL source code identified by the specified PFX shader specification in the specified PFX resource loader.
Shaders loaded through this method are cached. If the shader was already loaded and is in the cache, it is retrieved and returned. If the shader has not in the cache, it is created compiled from GLSL code identified by the specified PFX shader specification, and added to the shader cache. It is safe to invoke this method any time the shader is needed, without having to worry that the shader will be repeatedly loaded and compiled.
If the shader is created and compiled, the GLSL code may be embedded in the PFX file, or may be contained in a separate GLSL source code file, as defined by the PFX shader spec.
To clear a shader instance from the cache, use the removeShader: method.
Extends class CC3Shader.