| Support Forum Library Source SourceForge Page G3D Web Page |
Inherits G3D::ReferenceCountedObject.
Inherited by G3D::SuperShader::ExtraLightPass, G3D::SuperShader::NonShadowedPass, and G3D::SuperShader::ShadowedPass.
Public Types | |
| typedef shared_ptr< Pass > | Ref |
Public Member Functions | |
| virtual shared_ptr< OldShader > | getConfiguredShader (const UniversalMaterial &material, CullFace c=CullFace::CURRENT) |
| Given a material and the current settings on this pass, returns the appropriately configured shader. | |
Static Public Member Functions | |
| static PassRef | fromFiles (const std::string &vertexFilename, const std::string &pixelFilename) |
| Constructs a new SuperShader pass from the specified vertex and pixel shaders. | |
| static void | purgeCache () |
| Clears the static cache of SuperShader::Pass to clean up memory or allow reloading. | |
Public Attributes | |
| ShaderProgram::ArgList | args |
| These will be merged with the UniversalMaterial-based args when applied to the shader. | |
| std::string | customShaderPrefix |
| This will be added after the UniversalMaterial-based customShaderPrefix when getting the configured the shader. | |
Protected Member Functions | |
| Pass () | |
| For subclasses that don't want to load from a file. | |
| Pass (const std::string &vertexFilename, const std::string &pixelFilename) | |
Static Protected Member Functions | |
| static shared_ptr< OldShader > | getConfiguredShader (const std::string &vertexFilename, const std::string &pixelFilename, const UniversalMaterial &material, const std::string &extraDefines) |
| Returns a shader (perhaps from the cache) with arguments and #defines configured for this material. | |
Protected Attributes | |
| std::string | m_pixelFilename |
| std::string | m_vertexFilename |
Static Protected Attributes | |
| static ExtraLightPassRef | extraLightInstance |
| Special case cache for its own subclass. | |
| static NonShadowedPassRef | nonShadowedInstance |
| Special case cache for its own subclass. | |
| static ShadowedPassRef | shadowedInstance |
| Special case cache for its own subclass. | |
| typedef shared_ptr<Pass> G3D::SuperShader::Pass::Ref |
|
protected |
For subclasses that don't want to load from a file.
|
protected |
|
static |
Constructs a new SuperShader pass from the specified vertex and pixel shaders.
|
staticprotected |
Returns a shader (perhaps from the cache) with arguments and #defines configured for this material.
| extraDefines | Code to insert after the material macros; typically compile-time parameters defined by macros. |
|
virtual |
Given a material and the current settings on this pass, returns the appropriately configured shader.
Note that this shader may be shared cached between calls and is only affected by state set on the Pass before getConfiguredShader is called.
| c | Affects the subsequent calls to getConfiguredShader by setting the backside argument. If CULL_CURRENT, the current state is unmodified. |
| extraDefines | Code to insert after the material macros; typically compile-time parameters defined by macros. |
Reimplemented in G3D::SuperShader::NonShadowedPass.
|
static |
Clears the static cache of SuperShader::Pass to clean up memory or allow reloading.
| ShaderProgram::ArgList G3D::SuperShader::Pass::args |
These will be merged with the UniversalMaterial-based args when applied to the shader.
These arguments will override the UniversalMaterial ones if there are duplicates (although it is not recommended to override UniversalMaterial properties here.)
Subclasses contain helper methods for automatically filling out these arguments, but you can always directly access the full argument list. However, be aware that those arguments will remain until you explicitly clear the list with args.clear().
| std::string G3D::SuperShader::Pass::customShaderPrefix |
This will be added after the UniversalMaterial-based customShaderPrefix when getting the configured the shader.
|
staticprotected |
Special case cache for its own subclass.
|
protected |
|
protected |
|
staticprotected |
Special case cache for its own subclass.
|
staticprotected |
Special case cache for its own subclass.
1.8.2