#include <OgreQuake3ShaderManager.h>
Inheritance diagram for Ogre::Quake3ShaderManager:
Public Member Functions | |||||||
Quake3ShaderManager () | |||||||
virtual | ~Quake3ShaderManager () | ||||||
const StringVector & | getScriptPatterns (void) const | ||||||
| |||||||
void | parseScript (DataStreamPtr &stream, const String &groupName) | ||||||
| |||||||
Real | getLoadingOrder (void) const | ||||||
| |||||||
Quake3Shader * | create (const String &name) | ||||||
Create implementation. | |||||||
void | clear (void) | ||||||
Clear all the current shaders. | |||||||
Quake3Shader * | getByName (const String &name) | ||||||
Retrieve a Quake3Shader by name. | |||||||
Singleton (void) | |||||||
Static Public Member Functions | |||||||
static Quake3ShaderManager & | getSingleton (void) | ||||||
Override standard Singleton retrieval. | |||||||
static Quake3ShaderManager * | getSingletonPtr (void) | ||||||
Override standard Singleton retrieval. | |||||||
Protected Types | |||||||
typedef std::map< String, Quake3Shader * > | Quake3ShaderMap | ||||||
Protected Member Functions | |||||||
void | parseNewShaderPass (DataStreamPtr &stream, Quake3Shader *pShader) | ||||||
void | parseShaderAttrib (const String &line, Quake3Shader *pShader) | ||||||
void | parseShaderPassAttrib (const String &line, Quake3Shader *pShader, Quake3Shader::Pass *pPass) | ||||||
SceneBlendFactor | convertBlendFunc (const String &q3func) | ||||||
Protected Attributes | |||||||
Quake3ShaderMap | mShaderMap | ||||||
StringVector | mScriptPatterns | ||||||
Static Protected Attributes | |||||||
static Quake3ShaderManager * | ms_Singleton |
Quake3 uses .shader files to define custom shaders, or Materials in Ogre-speak. When a surface texture is mentioned in a level file, it includes no file extension meaning that it can either be a standard texture image (+lightmap) if there is only a .jpg or .tga file, or it may refer to a custom shader if a shader with that name is included in one of the .shader files in the scripts/ folder. Because there are multiple shaders per file you have to parse all the .shader files available to know if there is a custom shader available. This class is designed to parse all the .shader files available and save their settings for future use. I choose not to set up Material instances for shaders found since they may or may not be used by a level, so it would be very wasteful to set up Materials since they load texture images for each layer (apart from the lightmap). Once the usage of a shader is confirmed, a full Material instance can be set up from it. Because this is a subclass of ScriptLoader, any files mentioned will be searched for in any path or archive added to the ResourceGroupManager::WORLD_GROUP_NAME group. See ResourceGroupManager for details.
Definition at line 51 of file OgreQuake3ShaderManager.h.
|
Definition at line 59 of file OgreQuake3ShaderManager.h. |
|
|
|
|
|
Clear all the current shaders.
|
|
|
|
Create implementation.
|
|
Retrieve a Quake3Shader by name.
|
|
Implements Ogre::ScriptLoader. |
|
Implements Ogre::ScriptLoader. |
|
Override standard Singleton retrieval.
Reimplemented from Ogre::Singleton< Quake3ShaderManager >. |
|
Override standard Singleton retrieval.
Reimplemented from Ogre::Singleton< Quake3ShaderManager >. |
|
|
|
Implements Ogre::ScriptLoader. |
|
|
|
|
|
Definition at line 57 of file OgreSingleton.h. |
|
Definition at line 54 of file OgreSingleton.h. |
|
Definition at line 61 of file OgreQuake3ShaderManager.h. |
|
Definition at line 60 of file OgreQuake3ShaderManager.h. |
Copyright © 2000-2005 by The OGRE Team
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Sun Jul 23 10:11:27 2006