Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages

# Ogre::MaterialSerializer Class Reference

Class for serializing Materials to / from a .material script. More...

`#include <OgreMaterialSerializer.h>`

List of all members.

## Public Methods

| MaterialSerializer ()
| default constructor
virtual | ~MaterialSerializer ()
| default destructor
void | queueForExport (const Material *pMat, bool clearQueued=false, bool exportDefaults=false)
| Queue an in-memory Material to the internal buffer for export.
void | exportQueued (const String &filename)
| Exports queued material(s) to a named material script file.
void | exportMaterial (const Material *pMat, const String &filename, bool exportDefaults=false)
| Exports an in-memory Material to the named material script file.
const String & | getQueuedAsString () const
| Returns a string representing the parsed material(s).
void | clearQueue ()
| Clears the internal buffer.
void | parseScript (DataChunk &chunk, const String &filename="")
| Parses a Material script file passed as a chunk.

## Protected Types

typedef std::map< String, ATTRIBUTE_PARSER > | AttribParserList
| Keyword-mapped attribute parsers.
typedef std::multimap< TextureUnitState::TextureEffectType, TextureUnitState::TextureEffect > | EffectMap

## Protected Methods

bool | parseScriptLine (String &line)
| internal method for parsing a material
bool | invokeParser (String &line, AttribParserList &parsers)
| internal method for finding & invoking an attribute parser.
void | finishProgramDefinition (void)
| Internal method for saving a program definition which has been built up.
void | writeMaterial (const Material *pMat)
void | writeTechnique (const Technique *pTech)
void | writePass (const Pass *pPass)
void | writeTextureUnit (const TextureUnitState *pTex)
void | writeSceneBlendFactor (const SceneBlendFactor sbf_src, const SceneBlendFactor sbf_dest)
void | writeSceneBlendFactor (const SceneBlendFactor sbf)
void | writeCompareFunction (const CompareFunction cf)
void | writeColourValue (const ColourValue &colour, bool writeAlpha=false)
void | writeLayerBlendOperationEx (const LayerBlendOperationEx op)
void | writeLayerBlendSource (const LayerBlendSource lbs)
void | writeRotationEffect (const TextureUnitState::TextureEffect &effect, const TextureUnitState *pTex)
void | writeTransformEffect (const TextureUnitState::TextureEffect &effect, const TextureUnitState *pTex)
void | writeScrollEffect (const TextureUnitState::TextureEffect &effect, const TextureUnitState *pTex)
void | writeEnvironmentMapEffect (const TextureUnitState::TextureEffect &effect, const TextureUnitState *pTex)
String | convertFiltering (FilterOptions fo)

## Protected Attributes

MaterialScriptContext | mScriptContext
AttribParserList | mRootAttribParsers
| Parsers for the root of the material script.
AttribParserList | mMaterialAttribParsers
| Parsers for the material section of a script.
AttribParserList | mTechniqueAttribParsers
| Parsers for the technique section of a script.
AttribParserList | mPassAttribParsers
| Parsers for the pass section of a script.
AttribParserList | mTextureUnitAttribParsers
| Parsers for the texture unit section of a script.
AttribParserList | mProgramRefAttribParsers
| Parsers for the program reference section of a script.
AttribParserList | mProgramAttribParsers
| Parsers for the program definition section of a script.
AttribParserList | mProgramDefaultParamAttribParsers
| Parsers for the program definition section of a script.

## Private Methods

void | beginSection (unsigned short level)
void | endSection (unsigned short level)
void | writeAttribute (unsigned short level, const String &att)
void | writeValue (const String &val)
void | writeComment (unsigned short level, const String &comment)

## Private Attributes

String | mBuffer
bool | mDefaults

## Detailed Description

Class for serializing Materials to / from a .material script.

Definition at line 88 of file OgreMaterialSerializer.h.

## Member Typedef Documentation

typedef std::map<String, ATTRIBUTE_PARSER> Ogre::MaterialSerializer::AttribParserList`[protected]`

| Keyword-mapped attribute parsers. Definition at line 92 of file OgreMaterialSerializer.h.

typedef std::multimap<TextureUnitState::TextureEffectType, TextureUnitState::TextureEffect> Ogre::MaterialSerializer::EffectMap`[protected]`

| Definition at line 135 of file OgreMaterialSerializer.h. Referenced by writeTextureUnit().

## Constructor & Destructor Documentation

Ogre::MaterialSerializer::MaterialSerializer | ( |  | ) |

default constructor

Definition at line 1892 of file OgreMaterialSerializer.cpp.

References Ogre::ATTRIBUTE_PARSER, Ogre::MaterialScriptContext::filename, Ogre::MaterialScriptContext::lineNo, Ogre::MaterialScriptContext::material, mBuffer, mMaterialAttribParsers, mPassAttribParsers, mProgramAttribParsers, mProgramDefaultParamAttribParsers, mProgramRefAttribParsers, mRootAttribParsers, mScriptContext, Ogre::MSS_NONE, mTechniqueAttribParsers, mTextureUnitAttribParsers, Ogre::parseAlphaOpEx(), Ogre::parseAlphaRejection(), Ogre::parseAmbient(), Ogre::parseAnimTexture(), Ogre::parseAnisotropy(), Ogre::parseColourOp(), Ogre::parseColourOpEx(), Ogre::parseColourOpFallback(), Ogre::parseColourWrite(), Ogre::parseCubicTexture(), Ogre::parseCullHardware(), Ogre::parseCullSoftware(), Ogre::parseDefaultParams(), Ogre::parseDepthBias(), Ogre::parseDepthCheck(), Ogre::parseDepthFunc(), Ogre::parseDepthWrite(), Ogre::parseDiffuse(), Ogre::parseEmissive(), Ogre::parseEnvMap(), Ogre::parseFiltering(), Ogre::parseFogging(), Ogre::parseFragmentProgram(), Ogre::parseFragmentProgramRef(), Ogre::parseIteration(), Ogre::parseLighting(), Ogre::parseLodDistances(), Ogre::parseLodIndex(), Ogre::parseMaterial(), Ogre::parseMaxLights(), Ogre::parseParamIndexed(), Ogre::parseParamIndexedAuto(), Ogre::parseParamNamed(), Ogre::parseParamNamedAuto(), Ogre::parsePass(), Ogre::parseProgramSkeletalAnimation(), Ogre::parseProgramSource(), Ogre::parseProgramSyntax(), Ogre::parseReceiveShadows(), Ogre::parseRotate(), Ogre::parseRotateAnim(), Ogre::parseScale(), Ogre::parseSceneBlend(), Ogre::parseScroll(), Ogre::parseScrollAnim(), Ogre::parseShading(), Ogre::parseShadowCasterVertexProgramRef(), Ogre::parseShadowReceiverVertexProgramRef(), Ogre::parseSpecular(), Ogre::parseTechnique(), Ogre::parseTexAddressMode(), Ogre::parseTexCoord(), Ogre::parseTexture(), Ogre::parseTextureSource(), Ogre::parseTextureUnit(), Ogre::parseTransparencyCastsShadows(), Ogre::parseVertexProgram(), Ogre::parseVertexProgramRef(), Ogre::parseWaveXform(), Ogre::MaterialScriptContext::pass, Ogre::MaterialScriptContext::passLev, Ogre::MaterialScriptContext::program, Ogre::MaterialScriptContext::section, Ogre::MaterialScriptContext::stateLev, Ogre::MaterialScriptContext::techLev, Ogre::MaterialScriptContext::technique, and Ogre::MaterialScriptContext::textureUnit.

virtual Ogre::MaterialSerializer::~MaterialSerializer | ( |  | ) | `[virtual]`

| default destructor Definition at line 147 of file OgreMaterialSerializer.h.

## Member Function Documentation

void Ogre::MaterialSerializer::beginSection | ( | unsigned short | level | ) | `[private]`

| Definition at line 173 of file OgreMaterialSerializer.h. Referenced by writeMaterial(), writePass(), writeTechnique(), and writeTextureUnit().

void Ogre::MaterialSerializer::clearQueue | ( |  | ) |

| Clears the internal buffer. Definition at line 2355 of file OgreMaterialSerializer.cpp. References mBuffer. Referenced by exportMaterial(), exportQueued(), and queueForExport().

String Ogre::MaterialSerializer::convertFiltering | ( | FilterOptions | fo | ) | `[protected]`

| Definition at line 2675 of file OgreMaterialSerializer.cpp. References Ogre::FilterOptions, Ogre::FO_ANISOTROPIC, Ogre::FO_LINEAR, Ogre::FO_NONE, Ogre::FO_POINT, and Ogre::String. Referenced by writeTextureUnit().

void Ogre::MaterialSerializer::endSection | ( | unsigned short | level | ) | `[private]`

| Definition at line 182 of file OgreMaterialSerializer.h. Referenced by writeMaterial(), writePass(), writeTechnique(), and writeTextureUnit().

void Ogre::MaterialSerializer::exportMaterial | ( | const Material * | pMat,
|  | const String & | filename,
|  | bool | exportDefaults = false
| ) |

| Exports an in-memory Material to the named material script file. Definition at line 2320 of file OgreMaterialSerializer.cpp. References clearQueue(), exportQueued(), mDefaults, Ogre::String, and writeMaterial().

void Ogre::MaterialSerializer::exportQueued | ( | const String & | filename | ) |

| Exports queued material(s) to a named material script file. Definition at line 2328 of file OgreMaterialSerializer.cpp. References clearQueue(), Except, Ogre::LML_CRITICAL, mBuffer, and Ogre::String. Referenced by exportMaterial().

void Ogre::MaterialSerializer::finishProgramDefinition | ( | void |  | ) | `[protected]`

Internal method for saving a program definition which has been built up.

Definition at line 2200 of file OgreMaterialSerializer.cpp.

References Ogre::MaterialScriptProgramDefinition::customParameters, Ogre::MaterialScriptContext::defaultParamLines, Ogre::GpuProgram::getDefaultParameters(), Ogre::GpuProgram::isSupported(), Ogre::MaterialScriptProgramDefinition::language, Ogre::logParseError(), mProgramDefaultParamAttribParsers, mScriptContext, Ogre::MaterialScriptProgramDefinition::name, Ogre::MaterialScriptContext::program, Ogre::MaterialScriptContext::programDef, Ogre::MaterialScriptContext::programParams, Ogre::MaterialScriptProgramDefinition::progType, Ogre::StringInterface::setParameter(), Ogre::GpuProgram::setSkeletalAnimationIncluded(), Ogre::GpuProgram::setSourceFile(), Ogre::MaterialScriptProgramDefinition::source, Ogre::String, Ogre::StringVector, Ogre::MaterialScriptProgramDefinition::supportsSkeletalAnimation, and Ogre::MaterialScriptProgramDefinition::syntax.

Referenced by parseScriptLine().

const String & Ogre::MaterialSerializer::getQueuedAsString | ( |  | ) | const

| Returns a string representing the parsed material(s). Definition at line 2360 of file OgreMaterialSerializer.cpp. References mBuffer, and Ogre::String.

bool Ogre::MaterialSerializer::invokeParser | ( | String & | line,
|  | AttribParserList & | parsers
| ) | `[protected]`

| internal method for finding & invoking an attribute parser. Definition at line 2297 of file OgreMaterialSerializer.cpp. References Ogre::logParseError(), mScriptContext, Ogre::String, and Ogre::StringVector. Referenced by parseScriptLine().

void Ogre::MaterialSerializer::parseScript | ( | DataChunk & | chunk,
|  | const String & | filename = ""
| ) |

Parses a Material script file passed as a chunk.

Remarks:
  The filename is optional, if specified it will appear in the log of any errors which are reported.

Definition at line 1988 of file OgreMaterialSerializer.cpp.

References Ogre::MaterialScriptContext::filename, Ogre::DataChunk::getLine(), Ogre::DataChunk::isEOF(), Ogre::MaterialScriptContext::lineNo, Ogre::logParseError(), Ogre::MaterialScriptContext::material, mScriptContext, Ogre::MSS_NONE, parseScriptLine(), Ogre::MaterialScriptContext::pass, Ogre::MaterialScriptContext::passLev, Ogre::MaterialScriptContext::program, Ogre::MaterialScriptContext::section, Ogre::MaterialScriptContext::stateLev, Ogre::String, Ogre::MaterialScriptContext::techLev, Ogre::MaterialScriptContext::technique, and Ogre::MaterialScriptContext::textureUnit.

Referenced by Ogre::MaterialManager::parseAllSources(), and Ogre::MaterialManager::parseScript().

bool Ogre::MaterialSerializer::parseScriptLine | ( | String & | line | ) | `[protected]`

internal method for parsing a material

Returns:
  true if it expects the next line to be a {

Definition at line 2042 of file OgreMaterialSerializer.cpp.

References Ogre::MaterialScriptContext::defaultParamLines, finishProgramDefinition(), Ogre::Material::getName(), invokeParser(), Ogre::logParseError(), Ogre::MaterialScriptContext::material, mMaterialAttribParsers, mPassAttribParsers, mProgramAttribParsers, mProgramRefAttribParsers, mRootAttribParsers, mScriptContext, Ogre::MSS_DEFAULT_PARAMETERS, Ogre::MSS_MATERIAL, Ogre::MSS_NONE, Ogre::MSS_PASS, Ogre::MSS_PROGRAM, Ogre::MSS_PROGRAM_REF, Ogre::MSS_TECHNIQUE, Ogre::MSS_TEXTURESOURCE, Ogre::MSS_TEXTUREUNIT, mTechniqueAttribParsers, mTextureUnitAttribParsers, Ogre::parseProgramCustomParameter(), Ogre::parseTextureCustomParameter(), Ogre::MaterialScriptContext::pass, Ogre::MaterialScriptContext::passLev, Ogre::MaterialScriptContext::program, Ogre::MaterialScriptContext::programDef, Ogre::MaterialScriptContext::section, Ogre::MaterialScriptContext::stateLev, Ogre::String, Ogre::StringVector, Ogre::MaterialScriptContext::techLev, Ogre::MaterialScriptContext::technique, and Ogre::MaterialScriptContext::textureUnit.

Referenced by parseScript().

void Ogre::MaterialSerializer::queueForExport | ( | const Material * | pMat,
|  | bool | clearQueued = false,
|  | bool | exportDefaults = false
| ) |

| Queue an in-memory Material to the internal buffer for export. Definition at line 2346 of file OgreMaterialSerializer.cpp. References clearQueue(), mDefaults, and writeMaterial().

void Ogre::MaterialSerializer::writeAttribute | ( | unsigned short | level,
|  | const String & | att
| ) | `[private]`

| Definition at line 192 of file OgreMaterialSerializer.h. References Ogre::String. Referenced by writeEnvironmentMapEffect(), writeMaterial(), writePass(), writeRotationEffect(), writeScrollEffect(), writeTechnique(), writeTextureUnit(), and writeTransformEffect().

void Ogre::MaterialSerializer::writeColourValue | ( | const ColourValue & | colour,
|  | bool | writeAlpha = false
| ) | `[protected]`

| Definition at line 3075 of file OgreMaterialSerializer.cpp. References Ogre::ColourValue::a, Ogre::ColourValue::b, Ogre::ColourValue::g, Ogre::ColourValue::r, and writeValue(). Referenced by writePass(), and writeTextureUnit().

void Ogre::MaterialSerializer::writeComment | ( | unsigned short | level,
|  | const String & | comment
| ) | `[private]`

| Definition at line 207 of file OgreMaterialSerializer.h. References Ogre::String.

void Ogre::MaterialSerializer::writeCompareFunction | ( | const CompareFunction | cf | ) | `[protected]`

| Definition at line 3044 of file OgreMaterialSerializer.cpp. References Ogre::CMPF_ALWAYS_FAIL, Ogre::CMPF_ALWAYS_PASS, Ogre::CMPF_EQUAL, Ogre::CMPF_GREATER, Ogre::CMPF_GREATER_EQUAL, Ogre::CMPF_LESS, Ogre::CMPF_LESS_EQUAL, Ogre::CMPF_NOT_EQUAL, Ogre::CompareFunction, and writeValue(). Referenced by writePass(), and writeTextureUnit().

void Ogre::MaterialSerializer::writeEnvironmentMapEffect | ( | const TextureUnitState::TextureEffect & | effect,
|  | const TextureUnitState * | pTex
| ) | `[protected]`

| Definition at line 2905 of file OgreMaterialSerializer.cpp. References Ogre::TextureUnitState::TextureEffect::subtype, writeAttribute(), and writeValue(). Referenced by writeTextureUnit().

void Ogre::MaterialSerializer::writeLayerBlendOperationEx | ( | const LayerBlendOperationEx | op | ) | `[protected]`

Definition at line 3084 of file OgreMaterialSerializer.cpp.

References Ogre::LayerBlendOperationEx, Ogre::LBX_ADD, Ogre::LBX_ADD_SIGNED, Ogre::LBX_ADD_SMOOTH, Ogre::LBX_BLEND_CURRENT_ALPHA, Ogre::LBX_BLEND_DIFFUSE_ALPHA, Ogre::LBX_BLEND_MANUAL, Ogre::LBX_BLEND_TEXTURE_ALPHA, Ogre::LBX_DOTPRODUCT, Ogre::LBX_MODULATE, Ogre::LBX_MODULATE_X2, Ogre::LBX_MODULATE_X4, Ogre::LBX_SOURCE1, Ogre::LBX_SOURCE2, Ogre::LBX_SUBTRACT, and writeValue().

Referenced by writeTextureUnit().

void Ogre::MaterialSerializer::writeLayerBlendSource | ( | const LayerBlendSource | lbs | ) | `[protected]`

| Definition at line 3133 of file OgreMaterialSerializer.cpp. References Ogre::LayerBlendSource, Ogre::LBS_CURRENT, Ogre::LBS_DIFFUSE, Ogre::LBS_MANUAL, Ogre::LBS_SPECULAR, Ogre::LBS_TEXTURE, and writeValue(). Referenced by writeTextureUnit().

void Ogre::MaterialSerializer::writeMaterial | ( | const Material * | pMat | ) | `[protected]`

Definition at line 2365 of file OgreMaterialSerializer.cpp.

References beginSection(), endSection(), Ogre::Material::getLodDistanceIterator(), Ogre::Material::getName(), Ogre::Material::getReceiveShadows(), Ogre::Material::getTransparencyCastsShadows(), Ogre::LML_CRITICAL, mDefaults, Ogre::Real, Ogre::String, writeAttribute(), writeTechnique(), and writeValue().

Referenced by exportMaterial(), and queueForExport().

void Ogre::MaterialSerializer::writePass | ( | const Pass * | pPass | ) | `[protected]`

Definition at line 2436 of file OgreMaterialSerializer.cpp.

References Ogre::ColourValue::a, Ogre::ColourValue::b, beginSection(), Ogre::CMPF_LESS_EQUAL, Ogre::CULL_ANTICLOCKWISE, Ogre::CULL_CLOCKWISE, Ogre::CULL_NONE, Ogre::CullingMode, endSection(), Ogre::FOG_EXP, Ogre::FOG_EXP2, Ogre::FOG_LINEAR, Ogre::FOG_NONE, Ogre::ColourValue::g, Ogre::Pass::getAmbient(), Ogre::Pass::getCullingMode(), Ogre::Pass::getDepthBias(), Ogre::Pass::getDepthCheckEnabled(), Ogre::Pass::getDepthFunction(), Ogre::Pass::getDepthWriteEnabled(), Ogre::Pass::getDestBlendFactor(), Ogre::Pass::getDiffuse(), Ogre::Pass::getFogColour(), Ogre::Pass::getFogDensity(), Ogre::Pass::getFogEnd(), Ogre::Pass::getFogMode(), Ogre::Pass::getFogOverride(), Ogre::Pass::getFogStart(), Ogre::Pass::getLightingEnabled(), Ogre::Pass::getManualCullingMode(), Ogre::Pass::getMaxSimultaneousLights(), Ogre::Pass::getOnlyLightType(), Ogre::Pass::getRunOncePerLight(), Ogre::Pass::getRunOnlyForOneLightType(), Ogre::Pass::getSelfIllumination(), Ogre::Pass::getShadingMode(), Ogre::Pass::getShininess(), Ogre::Pass::getSourceBlendFactor(), Ogre::Pass::getSpecular(), Ogre::LML_CRITICAL, Ogre::MANUAL_CULL_BACK, Ogre::MANUAL_CULL_FRONT, Ogre::MANUAL_CULL_NONE, Ogre::ManualCullingMode, mDefaults, OGRE_MAX_SIMULTANEOUS_LIGHTS, Ogre::ColourValue::r, Ogre::SBF_ONE, Ogre::SBF_ZERO, Ogre::SO_FLAT, Ogre::SO_GOURAUD, Ogre::SO_PHONG, writeAttribute(), writeColourValue(), writeCompareFunction(), writeSceneBlendFactor(), writeTextureUnit(), and writeValue().

Referenced by writeTechnique().

void Ogre::MaterialSerializer::writeRotationEffect | ( | const TextureUnitState::TextureEffect & | effect,
|  | const TextureUnitState * | pTex
| ) | `[protected]`

| Definition at line 2925 of file OgreMaterialSerializer.cpp. References Ogre::TextureUnitState::TextureEffect::arg1, writeAttribute(), and writeValue(). Referenced by writeTextureUnit().

void Ogre::MaterialSerializer::writeSceneBlendFactor | ( | const SceneBlendFactor | sbf | ) | `[protected]`

| Definition at line 2992 of file OgreMaterialSerializer.cpp. References Ogre::SBF_DEST_ALPHA, Ogre::SBF_DEST_COLOUR, Ogre::SBF_ONE, Ogre::SBF_ONE_MINUS_DEST_ALPHA, Ogre::SBF_ONE_MINUS_DEST_COLOUR, Ogre::SBF_ONE_MINUS_SOURCE_ALPHA, Ogre::SBF_ONE_MINUS_SOURCE_COLOUR, Ogre::SBF_SOURCE_ALPHA, Ogre::SBF_SOURCE_COLOUR, Ogre::SBF_ZERO, Ogre::SceneBlendFactor, and writeValue().

void Ogre::MaterialSerializer::writeSceneBlendFactor | ( | const SceneBlendFactor | sbf_src,
|  | const SceneBlendFactor | sbf_dest
| ) | `[protected]`

| Definition at line 3029 of file OgreMaterialSerializer.cpp. References Ogre::SBF_ONE, Ogre::SBF_ONE_MINUS_SOURCE_ALPHA, Ogre::SBF_ONE_MINUS_SOURCE_COLOUR, Ogre::SBF_SOURCE_ALPHA, Ogre::SBF_SOURCE_COLOUR, Ogre::SceneBlendFactor, and writeValue(). Referenced by writePass(), and writeTextureUnit().

void Ogre::MaterialSerializer::writeScrollEffect | ( | const TextureUnitState::TextureEffect & | effect,
|  | const TextureUnitState * | pTex
| ) | `[protected]`

| Definition at line 2982 of file OgreMaterialSerializer.cpp. References Ogre::TextureUnitState::TextureEffect::arg1, Ogre::TextureUnitState::TextureEffect::arg2, writeAttribute(), and writeValue(). Referenced by writeTextureUnit().

void Ogre::MaterialSerializer::writeTechnique | ( | const Technique * | pTech | ) | `[protected]`

| Definition at line 2419 of file OgreMaterialSerializer.cpp. References beginSection(), endSection(), writeAttribute(), and writePass(). Referenced by writeMaterial().

void Ogre::MaterialSerializer::writeTextureUnit | ( | const TextureUnitState * | pTex | ) | `[protected]`

Definition at line 2692 of file OgreMaterialSerializer.cpp.

References Ogre::LayerBlendModeEx::alphaArg1, Ogre::LayerBlendModeEx::alphaArg2, beginSection(), Ogre::CMPF_ALWAYS_PASS, Ogre::LayerBlendModeEx::colourArg1, Ogre::LayerBlendModeEx::colourArg2, convertFiltering(), EffectMap, endSection(), Ogre::LayerBlendModeEx::factor, Ogre::FO_LINEAR, Ogre::FO_POINT, Ogre::FT_MAG, Ogre::FT_MIN, Ogre::FT_MIP, Ogre::TextureUnitState::getAlphaBlendMode(), Ogre::TextureUnitState::getAlphaRejectFunction(), Ogre::TextureUnitState::getAlphaRejectValue(), Ogre::TextureUnitState::getAnimationDuration(), Ogre::TextureUnitState::getColourBlendFallbackDest(), Ogre::TextureUnitState::getColourBlendFallbackSrc(), Ogre::TextureUnitState::getColourBlendMode(), Ogre::TextureUnitState::getEffects(), Ogre::TextureUnitState::getFrameTextureName(), Ogre::TextureUnitState::getNumFrames(), Ogre::TextureUnitState::getTextureAddressingMode(), Ogre::TextureUnitState::getTextureAnisotropy(), Ogre::TextureUnitState::getTextureCoordSet(), Ogre::TextureUnitState::getTextureFiltering(), Ogre::TextureUnitState::getTextureName(), Ogre::TextureUnitState::getTextureRotate(), Ogre::TextureUnitState::getTextureType(), Ogre::TextureUnitState::getTextureUScale(), Ogre::TextureUnitState::getTextureUScroll(), Ogre::TextureUnitState::getTextureVScale(), Ogre::TextureUnitState::getTextureVScroll(), Ogre::TextureUnitState::isCubic(), Ogre::LBS_CURRENT, Ogre::LBS_MANUAL, Ogre::LBS_TEXTURE, Ogre::LBX_BLEND_MANUAL, Ogre::LBX_MODULATE, Ogre::LML_CRITICAL, mBuffer, mDefaults, Ogre::LayerBlendModeEx::operation, Ogre::LayerBlendModeEx::source1, Ogre::LayerBlendModeEx::source2, Ogre::TextureUnitState::TAM_CLAMP, Ogre::TextureUnitState::TAM_MIRROR, Ogre::TextureUnitState::TAM_WRAP, Ogre::TEX_TYPE_1D, Ogre::TEX_TYPE_2D, Ogre::TEX_TYPE_3D, Ogre::TEX_TYPE_CUBE_MAP, Ogre::TextureUnitState::TextureEffect::type, Ogre::Radian::valueDegrees(), writeAttribute(), writeColourValue(), writeCompareFunction(), writeEnvironmentMapEffect(), writeLayerBlendOperationEx(), writeLayerBlendSource(), writeRotationEffect(), writeSceneBlendFactor(), writeScrollEffect(), writeTransformEffect(), and writeValue().

Referenced by writePass().

void Ogre::MaterialSerializer::writeTransformEffect | ( | const TextureUnitState::TextureEffect & | effect,
|  | const TextureUnitState * | pTex
| ) | `[protected]`

Definition at line 2934 of file OgreMaterialSerializer.cpp.

References Ogre::TextureUnitState::TextureEffect::amplitude, Ogre::TextureUnitState::TextureEffect::base, Ogre::TextureUnitState::TextureEffect::frequency, Ogre::TextureUnitState::TextureEffect::phase, Ogre::TextureUnitState::TextureEffect::subtype, Ogre::TextureUnitState::TextureEffect::waveType, Ogre::WFT_INVERSE_SAWTOOTH, Ogre::WFT_SAWTOOTH, Ogre::WFT_SINE, Ogre::WFT_SQUARE, Ogre::WFT_TRIANGLE, writeAttribute(), and writeValue().

Referenced by writeTextureUnit().

void Ogre::MaterialSerializer::writeValue | ( | const String & | val | ) | `[private]`

| Definition at line 202 of file OgreMaterialSerializer.h. References Ogre::String. Referenced by writeColourValue(), writeCompareFunction(), writeEnvironmentMapEffect(), writeLayerBlendOperationEx(), writeLayerBlendSource(), writeMaterial(), writePass(), writeRotationEffect(), writeSceneBlendFactor(), writeScrollEffect(), writeTextureUnit(), and writeTransformEffect().

## Member Data Documentation

String Ogre::MaterialSerializer::mBuffer`[private]`

| Definition at line 170 of file OgreMaterialSerializer.h. Referenced by clearQueue(), exportQueued(), getQueuedAsString(), MaterialSerializer(), and writeTextureUnit().

bool Ogre::MaterialSerializer::mDefaults`[private]`

| Definition at line 171 of file OgreMaterialSerializer.h. Referenced by exportMaterial(), queueForExport(), writeMaterial(), writePass(), and writeTextureUnit().

AttribParserList Ogre::MaterialSerializer::mMaterialAttribParsers`[protected]`

| Parsers for the material section of a script. Definition at line 109 of file OgreMaterialSerializer.h. Referenced by MaterialSerializer(), and parseScriptLine().

AttribParserList Ogre::MaterialSerializer::mPassAttribParsers`[protected]`

| Parsers for the pass section of a script. Definition at line 113 of file OgreMaterialSerializer.h. Referenced by MaterialSerializer(), and parseScriptLine().

AttribParserList Ogre::MaterialSerializer::mProgramAttribParsers`[protected]`

| Parsers for the program definition section of a script. Definition at line 119 of file OgreMaterialSerializer.h. Referenced by MaterialSerializer(), and parseScriptLine().

AttribParserList Ogre::MaterialSerializer::mProgramDefaultParamAttribParsers`[protected]`

| Parsers for the program definition section of a script. Definition at line 121 of file OgreMaterialSerializer.h. Referenced by finishProgramDefinition(), and MaterialSerializer().

AttribParserList Ogre::MaterialSerializer::mProgramRefAttribParsers`[protected]`

| Parsers for the program reference section of a script. Definition at line 117 of file OgreMaterialSerializer.h. Referenced by MaterialSerializer(), and parseScriptLine().

AttribParserList Ogre::MaterialSerializer::mRootAttribParsers`[protected]`

| Parsers for the root of the material script. Definition at line 107 of file OgreMaterialSerializer.h. Referenced by MaterialSerializer(), and parseScriptLine().

MaterialScriptContext Ogre::MaterialSerializer::mScriptContext`[protected]`

| Definition at line 94 of file OgreMaterialSerializer.h. Referenced by finishProgramDefinition(), invokeParser(), MaterialSerializer(), parseScript(), and parseScriptLine().

AttribParserList Ogre::MaterialSerializer::mTechniqueAttribParsers`[protected]`

| Parsers for the technique section of a script. Definition at line 111 of file OgreMaterialSerializer.h. Referenced by MaterialSerializer(), and parseScriptLine().

AttribParserList Ogre::MaterialSerializer::mTextureUnitAttribParsers`[protected]`

| Parsers for the texture unit section of a script. Definition at line 115 of file OgreMaterialSerializer.h. Referenced by MaterialSerializer(), and parseScriptLine().

The documentation for this class was generated from the following files:

- OgreMaterialSerializer.h
- OgreMaterialSerializer.cpp

Copyright © 2002-2003 by The OGRE Team
Last modified Sun Nov 28 19:51:12 2004