source: OGRE/trunk/ogrenew/Docs/api/html/OgreMaterialSerializer_8h-source.html @ 692

Revision 692, 30.4 KB checked in by mattausch, 19 years ago (diff)

adding ogre 1.2 and dependencies

Line 
1<html>
2<head>
3<title>OgreMaterialSerializer.h Source File - OGRE Documentation</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
4<link type="text/css" rel="stylesheet" href="style.css">
5</head>
6
7<body>
8<!-- Generated by Doxygen 1.3.6 -->
9<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="namespacemembers.html">Namespace&nbsp;Members</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>
10<h1>OgreMaterialSerializer.h</h1><a href="OgreMaterialSerializer_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <span class="comment">/*</span>
1100002 <span class="comment">-----------------------------------------------------------------------------</span>
1200003 <span class="comment">This source file is part of OGRE</span>
1300004 <span class="comment">    (Object-oriented Graphics Rendering Engine)</span>
1400005 <span class="comment">For the latest info, see http://www.ogre3d.org/</span>
1500006 <span class="comment"></span>
1600007 <span class="comment">Copyright (c) 2000-2005 The OGRE Team</span>
1700008 <span class="comment">Also see acknowledgements in Readme.html</span>
1800009 <span class="comment"></span>
1900010 <span class="comment">This program is free software; you can redistribute it and/or modify it under</span>
2000011 <span class="comment">the terms of the GNU Lesser General Public License as published by the Free Software</span>
2100012 <span class="comment">Foundation; either version 2 of the License, or (at your option) any later</span>
2200013 <span class="comment">version.</span>
2300014 <span class="comment"></span>
2400015 <span class="comment">This program is distributed in the hope that it will be useful, but WITHOUT</span>
2500016 <span class="comment">ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS</span>
2600017 <span class="comment">FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.</span>
2700018 <span class="comment"></span>
2800019 <span class="comment">You should have received a copy of the GNU Lesser General Public License along with</span>
2900020 <span class="comment">this program; if not, write to the Free Software Foundation, Inc., 59 Temple</span>
3000021 <span class="comment">Place - Suite 330, Boston, MA 02111-1307, USA, or go to</span>
3100022 <span class="comment">http://www.gnu.org/copyleft/lesser.txt.</span>
3200023 <span class="comment">-----------------------------------------------------------------------------</span>
3300024 <span class="comment">*/</span>
3400025 <span class="preprocessor">#ifndef __MaterialSerializer_H__</span>
3500026 <span class="preprocessor"></span><span class="preprocessor">#define __MaterialSerializer_H__</span>
3600027 <span class="preprocessor"></span>
3700028 <span class="preprocessor">#include "<a class="code" href="OgrePrerequisites_8h.html">OgrePrerequisites.h</a>"</span>
3800029 <span class="preprocessor">#include "<a class="code" href="OgreMaterial_8h.html">OgreMaterial.h</a>"</span>
3900030 <span class="preprocessor">#include "<a class="code" href="OgreBlendMode_8h.html">OgreBlendMode.h</a>"</span>
4000031 <span class="preprocessor">#include "<a class="code" href="OgreTextureUnitState_8h.html">OgreTextureUnitState.h</a>"</span>
4100032 <span class="preprocessor">#include "<a class="code" href="OgreGpuProgram_8h.html">OgreGpuProgram.h</a>"</span>
4200033 <span class="preprocessor">#include "<a class="code" href="OgreStringVector_8h.html">OgreStringVector.h</a>"</span>
4300034
4400035 <span class="keyword">namespace </span>Ogre {
4500036
46<a name="l00038"></a><a class="code" href="namespaceOgre.html#a665">00038</a>     <span class="keyword">enum</span> MaterialScriptSection
4700039     {
4800040         MSS_NONE,
4900041         MSS_MATERIAL,
5000042         MSS_TECHNIQUE,
5100043         MSS_PASS,
5200044         MSS_TEXTUREUNIT,
5300045         MSS_PROGRAM_REF,
5400046         MSS_PROGRAM,
5500047         MSS_DEFAULT_PARAMETERS,
5600048         MSS_TEXTURESOURCE
5700049     };
58<a name="l00051"></a><a class="code" href="structOgre_1_1MaterialScriptProgramDefinition.html">00051</a>     <span class="keyword">struct </span><a class="code" href="structOgre_1_1MaterialScriptProgramDefinition.html">MaterialScriptProgramDefinition</a>
5900052     {
60<a name="l00053"></a><a class="code" href="structOgre_1_1MaterialScriptProgramDefinition.html#Ogre_1_1MaterialScriptProgramDefinitiono0">00053</a>         <a class="code" href="namespaceOgre.html#a471">String</a> name;
61<a name="l00054"></a><a class="code" href="structOgre_1_1MaterialScriptProgramDefinition.html#Ogre_1_1MaterialScriptProgramDefinitiono1">00054</a>         <a class="code" href="namespaceOgre.html#a658">GpuProgramType</a> progType;
62<a name="l00055"></a><a class="code" href="structOgre_1_1MaterialScriptProgramDefinition.html#Ogre_1_1MaterialScriptProgramDefinitiono2">00055</a>         <a class="code" href="namespaceOgre.html#a471">String</a> language;
63<a name="l00056"></a><a class="code" href="structOgre_1_1MaterialScriptProgramDefinition.html#Ogre_1_1MaterialScriptProgramDefinitiono3">00056</a>         <a class="code" href="namespaceOgre.html#a471">String</a> source;
64<a name="l00057"></a><a class="code" href="structOgre_1_1MaterialScriptProgramDefinition.html#Ogre_1_1MaterialScriptProgramDefinitiono4">00057</a>         <a class="code" href="namespaceOgre.html#a471">String</a> syntax;
65<a name="l00058"></a><a class="code" href="structOgre_1_1MaterialScriptProgramDefinition.html#Ogre_1_1MaterialScriptProgramDefinitiono5">00058</a>         <span class="keywordtype">bool</span> supportsSkeletalAnimation;
66<a name="l00059"></a><a class="code" href="structOgre_1_1MaterialScriptProgramDefinition.html#Ogre_1_1MaterialScriptProgramDefinitiono6">00059</a>         <span class="keywordtype">bool</span> supportsMorphAnimation;
67<a name="l00060"></a><a class="code" href="structOgre_1_1MaterialScriptProgramDefinition.html#Ogre_1_1MaterialScriptProgramDefinitiono7">00060</a>         <a class="code" href="namespaceOgre.html#a467">ushort</a> supportsPoseAnimation; <span class="comment">// number of simultaneous poses supported</span>
68<a name="l00061"></a><a class="code" href="structOgre_1_1MaterialScriptProgramDefinition.html#Ogre_1_1MaterialScriptProgramDefinitiono8">00061</a>         std::map&lt;String, String&gt; customParameters;
6900062     };
70<a name="l00064"></a><a class="code" href="structOgre_1_1MaterialScriptContext.html">00064</a>     <span class="keyword">struct </span><a class="code" href="structOgre_1_1MaterialScriptContext.html">MaterialScriptContext</a>
7100065     {
72<a name="l00066"></a><a class="code" href="structOgre_1_1MaterialScriptContext.html#Ogre_1_1MaterialScriptContexto0">00066</a>         MaterialScriptSection section;
73<a name="l00067"></a><a class="code" href="structOgre_1_1MaterialScriptContext.html#Ogre_1_1MaterialScriptContexto1">00067</a>         <a class="code" href="namespaceOgre.html#a471">String</a> groupName;
74<a name="l00068"></a><a class="code" href="structOgre_1_1MaterialScriptContext.html#Ogre_1_1MaterialScriptContexto2">00068</a>         <a class="code" href="classOgre_1_1MaterialPtr.html">MaterialPtr</a> material;
75<a name="l00069"></a><a class="code" href="structOgre_1_1MaterialScriptContext.html#Ogre_1_1MaterialScriptContexto3">00069</a>         <a class="code" href="classOgre_1_1Technique.html">Technique</a>* technique;
76<a name="l00070"></a><a class="code" href="structOgre_1_1MaterialScriptContext.html#Ogre_1_1MaterialScriptContexto4">00070</a>         <a class="code" href="classOgre_1_1Pass.html">Pass</a>* pass;
77<a name="l00071"></a><a class="code" href="structOgre_1_1MaterialScriptContext.html#Ogre_1_1MaterialScriptContexto5">00071</a>         <a class="code" href="classOgre_1_1TextureUnitState.html">TextureUnitState</a>* textureUnit;
78<a name="l00072"></a><a class="code" href="structOgre_1_1MaterialScriptContext.html#Ogre_1_1MaterialScriptContexto6">00072</a>         <a class="code" href="classOgre_1_1GpuProgramPtr.html">GpuProgramPtr</a> program; <span class="comment">// used when referencing a program, not when defining it</span>
79<a name="l00073"></a><a class="code" href="structOgre_1_1MaterialScriptContext.html#Ogre_1_1MaterialScriptContexto7">00073</a>         <span class="keywordtype">bool</span> isProgramShadowCaster; <span class="comment">// when referencing, are we in context of shadow caster</span>
80<a name="l00074"></a><a class="code" href="structOgre_1_1MaterialScriptContext.html#Ogre_1_1MaterialScriptContexto8">00074</a>         <span class="keywordtype">bool</span> <a class="code" href="structOgre_1_1MaterialScriptContext.html#Ogre_1_1MaterialScriptContexto8">isVertexProgramShadowReceiver</a>; <span class="comment">// when referencing, are we in context of shadow caster</span>
81<a name="l00075"></a><a class="code" href="structOgre_1_1MaterialScriptContext.html#Ogre_1_1MaterialScriptContexto9">00075</a>         <span class="keywordtype">bool</span> <a class="code" href="structOgre_1_1MaterialScriptContext.html#Ogre_1_1MaterialScriptContexto9">isFragmentProgramShadowReceiver</a>; <span class="comment">// when referencing, are we in context of shadow caster</span>
82<a name="l00076"></a><a class="code" href="structOgre_1_1MaterialScriptContext.html#Ogre_1_1MaterialScriptContexto10">00076</a>         <a class="code" href="classOgre_1_1SharedPtr.html">GpuProgramParametersSharedPtr</a> programParams;
83<a name="l00077"></a><a class="code" href="structOgre_1_1MaterialScriptContext.html#Ogre_1_1MaterialScriptContexto11">00077</a>         <a class="code" href="namespaceOgre.html#a467">ushort</a> numAnimationParametrics;
84<a name="l00078"></a><a class="code" href="structOgre_1_1MaterialScriptContext.html#Ogre_1_1MaterialScriptContexto12">00078</a>         <a class="code" href="structOgre_1_1MaterialScriptProgramDefinition.html">MaterialScriptProgramDefinition</a>* programDef; <span class="comment">// this is used while defining a program</span>
8500079
86<a name="l00080"></a><a class="code" href="structOgre_1_1MaterialScriptContext.html#Ogre_1_1MaterialScriptContexto13">00080</a>         <span class="keywordtype">int</span> techLev,    <span class="comment">//Keep track of what tech, pass, and state level we are in</span>
8700081             passLev,
8800082             stateLev;
89<a name="l00083"></a><a class="code" href="structOgre_1_1MaterialScriptContext.html#Ogre_1_1MaterialScriptContexto16">00083</a>         <a class="code" href="namespaceOgre.html#a580">StringVector</a> defaultParamLines;
9000084
9100085         <span class="comment">// Error reporting state</span>
92<a name="l00086"></a><a class="code" href="structOgre_1_1MaterialScriptContext.html#Ogre_1_1MaterialScriptContexto17">00086</a>         size_t lineNo;
93<a name="l00087"></a><a class="code" href="structOgre_1_1MaterialScriptContext.html#Ogre_1_1MaterialScriptContexto18">00087</a>         <a class="code" href="namespaceOgre.html#a471">String</a> filename;
94<a name="l00088"></a><a class="code" href="structOgre_1_1MaterialScriptContext.html#Ogre_1_1MaterialScriptContexto19">00088</a>         <a class="code" href="namespaceOgre.html#a77">AliasTextureNamePairList</a> textureAliases;
9500089     };
96<a name="l00091"></a><a class="code" href="namespaceOgre.html#a342">00091</a>     <span class="keyword">typedef</span> bool (*<a class="code" href="namespaceOgre.html#a342">ATTRIBUTE_PARSER</a>)(<a class="code" href="namespaceOgre.html#a471">String</a>&amp; params, <a class="code" href="structOgre_1_1MaterialScriptContext.html">MaterialScriptContext</a>&amp; context);
9700092
98<a name="l00094"></a><a class="code" href="classOgre_1_1MaterialSerializer.html">00094</a>     <span class="keyword">class </span><a class="code" href="OgrePlatform_8h.html#a16">_OgreExport</a> MaterialSerializer
9900095     {
10000096     <span class="keyword">protected</span>:
101<a name="l00098"></a><a class="code" href="classOgre_1_1MaterialSerializer.html#Ogre_1_1MaterialSerializerx0">00098</a>         <span class="keyword">typedef</span> std::map&lt;String, ATTRIBUTE_PARSER&gt; <a class="code" href="classOgre_1_1MaterialSerializer.html#Ogre_1_1MaterialSerializerx0">AttribParserList</a>;
10200099
103<a name="l00100"></a><a class="code" href="classOgre_1_1MaterialSerializer.html#Ogre_1_1MaterialSerializerp0">00100</a>         <a class="code" href="structOgre_1_1MaterialScriptContext.html">MaterialScriptContext</a> mScriptContext;
10400101
10500105         <span class="keywordtype">bool</span> parseScriptLine(<a class="code" href="namespaceOgre.html#a471">String</a>&amp; line);
10600107         <span class="keywordtype">bool</span> invokeParser(<a class="code" href="namespaceOgre.html#a471">String</a>&amp; line, <a class="code" href="classOgre_1_1MaterialSerializer.html#Ogre_1_1MaterialSerializerx0">AttribParserList</a>&amp; parsers);
10700111         <span class="keywordtype">void</span> finishProgramDefinition(<span class="keywordtype">void</span>);
108<a name="l00113"></a><a class="code" href="classOgre_1_1MaterialSerializer.html#Ogre_1_1MaterialSerializerp1">00113</a>         <a class="code" href="classOgre_1_1MaterialSerializer.html#Ogre_1_1MaterialSerializerx0">AttribParserList</a> mRootAttribParsers;
109<a name="l00115"></a><a class="code" href="classOgre_1_1MaterialSerializer.html#Ogre_1_1MaterialSerializerp2">00115</a>         <a class="code" href="classOgre_1_1MaterialSerializer.html#Ogre_1_1MaterialSerializerx0">AttribParserList</a> mMaterialAttribParsers;
110<a name="l00117"></a><a class="code" href="classOgre_1_1MaterialSerializer.html#Ogre_1_1MaterialSerializerp3">00117</a>         <a class="code" href="classOgre_1_1MaterialSerializer.html#Ogre_1_1MaterialSerializerx0">AttribParserList</a> mTechniqueAttribParsers;
111<a name="l00119"></a><a class="code" href="classOgre_1_1MaterialSerializer.html#Ogre_1_1MaterialSerializerp4">00119</a>         <a class="code" href="classOgre_1_1MaterialSerializer.html#Ogre_1_1MaterialSerializerx0">AttribParserList</a> mPassAttribParsers;
112<a name="l00121"></a><a class="code" href="classOgre_1_1MaterialSerializer.html#Ogre_1_1MaterialSerializerp5">00121</a>         <a class="code" href="classOgre_1_1MaterialSerializer.html#Ogre_1_1MaterialSerializerx0">AttribParserList</a> mTextureUnitAttribParsers;
113<a name="l00123"></a><a class="code" href="classOgre_1_1MaterialSerializer.html#Ogre_1_1MaterialSerializerp6">00123</a>         <a class="code" href="classOgre_1_1MaterialSerializer.html#Ogre_1_1MaterialSerializerx0">AttribParserList</a> mProgramRefAttribParsers;
114<a name="l00125"></a><a class="code" href="classOgre_1_1MaterialSerializer.html#Ogre_1_1MaterialSerializerp7">00125</a>         <a class="code" href="classOgre_1_1MaterialSerializer.html#Ogre_1_1MaterialSerializerx0">AttribParserList</a> mProgramAttribParsers;
115<a name="l00127"></a><a class="code" href="classOgre_1_1MaterialSerializer.html#Ogre_1_1MaterialSerializerp8">00127</a>         <a class="code" href="classOgre_1_1MaterialSerializer.html#Ogre_1_1MaterialSerializerx0">AttribParserList</a> mProgramDefaultParamAttribParsers;
11600128
11700129         <span class="keywordtype">void</span> writeMaterial(<span class="keyword">const</span> <a class="code" href="classOgre_1_1MaterialPtr.html">MaterialPtr</a>&amp; pMat);
11800130         <span class="keywordtype">void</span> writeTechnique(<span class="keyword">const</span> <a class="code" href="classOgre_1_1Technique.html">Technique</a>* pTech);
11900131         <span class="keywordtype">void</span> writePass(<span class="keyword">const</span> <a class="code" href="classOgre_1_1Pass.html">Pass</a>* pPass);
12000132         <span class="keywordtype">void</span> writeVertexProgramRef(<span class="keyword">const</span> <a class="code" href="classOgre_1_1Pass.html">Pass</a>* pPass);
12100133         <span class="keywordtype">void</span> writeShadowCasterVertexProgramRef(<span class="keyword">const</span> <a class="code" href="classOgre_1_1Pass.html">Pass</a>* pPass);
12200134         <span class="keywordtype">void</span> writeShadowReceiverVertexProgramRef(<span class="keyword">const</span> <a class="code" href="classOgre_1_1Pass.html">Pass</a>* pPass);
12300135         <span class="keywordtype">void</span> writeShadowReceiverFragmentProgramRef(<span class="keyword">const</span> <a class="code" href="classOgre_1_1Pass.html">Pass</a>* pPass);
12400136         <span class="keywordtype">void</span> writeFragmentProgramRef(<span class="keyword">const</span> <a class="code" href="classOgre_1_1Pass.html">Pass</a>* pPass);
12500137         <span class="keywordtype">void</span> writeGpuProgramRef(<span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a471">String</a>&amp; attrib, <span class="keyword">const</span> <a class="code" href="classOgre_1_1GpuProgramPtr.html">GpuProgramPtr</a>&amp; program, <span class="keyword">const</span> <a class="code" href="classOgre_1_1SharedPtr.html">GpuProgramParametersSharedPtr</a>&amp; params);
12600138         <span class="keywordtype">void</span> writeGpuPrograms(<span class="keywordtype">void</span>);
12700139         <span class="keywordtype">void</span> writeGPUProgramParameters(<span class="keyword">const</span> <a class="code" href="classOgre_1_1SharedPtr.html">GpuProgramParametersSharedPtr</a>&amp; params, <a class="code" href="classOgre_1_1GpuProgramParameters.html">GpuProgramParameters</a>* defaultParams,
12800140             <span class="keyword">const</span> <span class="keywordtype">int</span> level = 4, <span class="keyword">const</span> <span class="keywordtype">bool</span> useMainBuffer = <span class="keyword">true</span>);
12900141         <span class="keywordtype">void</span> writeTextureUnit(<span class="keyword">const</span> <a class="code" href="classOgre_1_1TextureUnitState.html">TextureUnitState</a> *pTex);
13000142
13100143         <span class="keywordtype">void</span> writeSceneBlendFactor(<span class="keyword">const</span> SceneBlendFactor sbf_src, <span class="keyword">const</span> SceneBlendFactor sbf_dest);
13200144         <span class="keywordtype">void</span> writeSceneBlendFactor(<span class="keyword">const</span> SceneBlendFactor sbf);
13300145         <span class="keywordtype">void</span> writeCompareFunction(<span class="keyword">const</span> CompareFunction cf);
13400146         <span class="keywordtype">void</span> writeColourValue(<span class="keyword">const</span> <a class="code" href="classOgre_1_1ColourValue.html">ColourValue</a> &amp;colour, <span class="keywordtype">bool</span> writeAlpha = <span class="keyword">false</span>);
13500147         <span class="keywordtype">void</span> writeLayerBlendOperationEx(<span class="keyword">const</span> LayerBlendOperationEx op);
13600148         <span class="keywordtype">void</span> writeLayerBlendSource(<span class="keyword">const</span> LayerBlendSource lbs);
13700149         
138<a name="l00150"></a><a class="code" href="classOgre_1_1MaterialSerializer.html#Ogre_1_1MaterialSerializerx1">00150</a>         <span class="keyword">typedef</span> std::multimap&lt;TextureUnitState::TextureEffectType, TextureUnitState::TextureEffect&gt; <a class="code" href="classOgre_1_1MaterialSerializer.html#Ogre_1_1MaterialSerializerx1">EffectMap</a>;
13900151
14000152         <span class="keywordtype">void</span> writeRotationEffect(<span class="keyword">const</span> <a class="code" href="structOgre_1_1TextureUnitState_1_1TextureEffect.html">TextureUnitState::TextureEffect</a>&amp; effect, <span class="keyword">const</span> <a class="code" href="classOgre_1_1TextureUnitState.html">TextureUnitState</a> *pTex);
14100153         <span class="keywordtype">void</span> writeTransformEffect(<span class="keyword">const</span> <a class="code" href="structOgre_1_1TextureUnitState_1_1TextureEffect.html">TextureUnitState::TextureEffect</a>&amp; effect, <span class="keyword">const</span> <a class="code" href="classOgre_1_1TextureUnitState.html">TextureUnitState</a> *pTex);
14200154         <span class="keywordtype">void</span> writeScrollEffect(<span class="keyword">const</span> <a class="code" href="structOgre_1_1TextureUnitState_1_1TextureEffect.html">TextureUnitState::TextureEffect</a>&amp; effect, <span class="keyword">const</span> <a class="code" href="classOgre_1_1TextureUnitState.html">TextureUnitState</a> *pTex);
14300155         <span class="keywordtype">void</span> writeEnvironmentMapEffect(<span class="keyword">const</span> <a class="code" href="structOgre_1_1TextureUnitState_1_1TextureEffect.html">TextureUnitState::TextureEffect</a>&amp; effect, <span class="keyword">const</span> <a class="code" href="classOgre_1_1TextureUnitState.html">TextureUnitState</a> *pTex);
14400156
14500157         <a class="code" href="namespaceOgre.html#a471">String</a> convertFiltering(FilterOptions fo);
14600158     <span class="keyword">public</span>:
14700160         MaterialSerializer();
148<a name="l00162"></a><a class="code" href="classOgre_1_1MaterialSerializer.html#Ogre_1_1MaterialSerializera1">00162</a>         <span class="keyword">virtual</span> ~MaterialSerializer() {};
14900163
15000170         <span class="keywordtype">void</span> queueForExport(<span class="keyword">const</span> <a class="code" href="classOgre_1_1MaterialPtr.html">MaterialPtr</a>&amp; pMat, <span class="keywordtype">bool</span> clearQueued = <span class="keyword">false</span>,
15100171             <span class="keywordtype">bool</span> exportDefaults = <span class="keyword">false</span>);
15200181         <span class="keywordtype">void</span> exportQueued(<span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a471">String</a>&amp; filename, <span class="keyword">const</span> <span class="keywordtype">bool</span> includeProgDef = <span class="keyword">false</span>, <span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a471">String</a>&amp; programFilename = <span class="stringliteral">""</span>);
15300191         <span class="keywordtype">void</span> exportMaterial(<span class="keyword">const</span> <a class="code" href="classOgre_1_1MaterialPtr.html">MaterialPtr</a>&amp; pMat, <span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a471">String</a>&amp; filename, <span class="keywordtype">bool</span> exportDefaults = <span class="keyword">false</span>,
15400192             <span class="keyword">const</span> <span class="keywordtype">bool</span> includeProgDef = <span class="keyword">false</span>, <span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a471">String</a>&amp; programFilename = <span class="stringliteral">""</span>);
15500194         <span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a471">String</a> &amp;getQueuedAsString() <span class="keyword">const</span>;
15600196         <span class="keywordtype">void</span> clearQueue();
15700197
15800200         <span class="keywordtype">void</span> parseScript(<a class="code" href="classOgre_1_1SharedPtr.html">DataStreamPtr</a>&amp; stream, <span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a471">String</a>&amp; groupName);
15900201
16000202
16100203
16200204     <span class="keyword">private</span>:
163<a name="l00205"></a><a class="code" href="classOgre_1_1MaterialSerializer.html#Ogre_1_1MaterialSerializerr0">00205</a>         <a class="code" href="namespaceOgre.html#a471">String</a> mBuffer;
164<a name="l00206"></a><a class="code" href="classOgre_1_1MaterialSerializer.html#Ogre_1_1MaterialSerializerr1">00206</a>         <a class="code" href="namespaceOgre.html#a471">String</a> mGpuProgramBuffer;
165<a name="l00207"></a><a class="code" href="classOgre_1_1MaterialSerializer.html#Ogre_1_1MaterialSerializery0">00207</a>         <span class="keyword">typedef</span> std::set&lt;String&gt; <a class="code" href="classOgre_1_1MaterialSerializer.html#Ogre_1_1MaterialSerializery0">GpuProgramDefinitionContainer</a>;
166<a name="l00208"></a><a class="code" href="classOgre_1_1MaterialSerializer.html#Ogre_1_1MaterialSerializery1">00208</a>         <span class="keyword">typedef</span> GpuProgramDefinitionContainer::iterator <a class="code" href="classOgre_1_1MaterialSerializer.html#Ogre_1_1MaterialSerializery1">GpuProgramDefIterator</a>;
167<a name="l00209"></a><a class="code" href="classOgre_1_1MaterialSerializer.html#Ogre_1_1MaterialSerializerr2">00209</a>         <a class="code" href="classOgre_1_1MaterialSerializer.html#Ogre_1_1MaterialSerializery0">GpuProgramDefinitionContainer</a> mGpuProgramDefinitionContainer;
168<a name="l00210"></a><a class="code" href="classOgre_1_1MaterialSerializer.html#Ogre_1_1MaterialSerializerr3">00210</a>         <span class="keywordtype">bool</span> mDefaults;
16900211
170<a name="l00212"></a><a class="code" href="classOgre_1_1MaterialSerializer.html#Ogre_1_1MaterialSerializerd0">00212</a>         <span class="keywordtype">void</span> beginSection(<span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> level, <span class="keyword">const</span> <span class="keywordtype">bool</span> useMainBuffer = <span class="keyword">true</span>)
17100213         {
17200214             <a class="code" href="namespaceOgre.html#a471">String</a>&amp; buffer = (useMainBuffer ? mBuffer : mGpuProgramBuffer);
17300215             buffer += <span class="stringliteral">"\n"</span>;
17400216             <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> i = 0; i &lt; level; ++i)
17500217             {
17600218                 buffer += <span class="stringliteral">"\t"</span>;
17700219             }
17800220             buffer += <span class="stringliteral">"{"</span>;
17900221         }
180<a name="l00222"></a><a class="code" href="classOgre_1_1MaterialSerializer.html#Ogre_1_1MaterialSerializerd1">00222</a>         <span class="keywordtype">void</span> endSection(<span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> level, <span class="keyword">const</span> <span class="keywordtype">bool</span> useMainBuffer = <span class="keyword">true</span>)
18100223         {
18200224             <a class="code" href="namespaceOgre.html#a471">String</a>&amp; buffer = (useMainBuffer ? mBuffer : mGpuProgramBuffer);
18300225             buffer += <span class="stringliteral">"\n"</span>;
18400226             <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> i = 0; i &lt; level; ++i)
18500227             {
18600228                 buffer += <span class="stringliteral">"\t"</span>;
18700229             }
18800230             buffer += <span class="stringliteral">"}"</span>;
18900231         }
19000232
191<a name="l00233"></a><a class="code" href="classOgre_1_1MaterialSerializer.html#Ogre_1_1MaterialSerializerd2">00233</a>         <span class="keywordtype">void</span> writeAttribute(<span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> level, <span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a471">String</a>&amp; att, <span class="keyword">const</span> <span class="keywordtype">bool</span> useMainBuffer = <span class="keyword">true</span>)
19200234         {
19300235             <a class="code" href="namespaceOgre.html#a471">String</a>&amp; buffer = (useMainBuffer ? mBuffer : mGpuProgramBuffer);
19400236             buffer += <span class="stringliteral">"\n"</span>;
19500237             <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> i = 0; i &lt; level; ++i)
19600238             {
19700239                 buffer += <span class="stringliteral">"\t"</span>;
19800240             }
19900241             buffer += att;
20000242         }
20100243
202<a name="l00244"></a><a class="code" href="classOgre_1_1MaterialSerializer.html#Ogre_1_1MaterialSerializerd3">00244</a>         <span class="keywordtype">void</span> writeValue(<span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a471">String</a>&amp; val, <span class="keyword">const</span> <span class="keywordtype">bool</span> useMainBuffer = <span class="keyword">true</span>)
20300245         {
20400246             <a class="code" href="namespaceOgre.html#a471">String</a>&amp; buffer = (useMainBuffer ? mBuffer : mGpuProgramBuffer);
20500247             buffer += (<span class="stringliteral">" "</span> + val);
20600248         }
20700249
208<a name="l00250"></a><a class="code" href="classOgre_1_1MaterialSerializer.html#Ogre_1_1MaterialSerializerd4">00250</a>         <span class="keywordtype">void</span> writeComment(<span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> level, <span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a471">String</a>&amp; comment, <span class="keyword">const</span> <span class="keywordtype">bool</span> useMainBuffer = <span class="keyword">true</span>)
20900251         {
21000252             <a class="code" href="namespaceOgre.html#a471">String</a>&amp; buffer = (useMainBuffer ? mBuffer : mGpuProgramBuffer);
21100253             buffer += <span class="stringliteral">"\n"</span>;
21200254             <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> i = 0; i &lt; level; ++i)
21300255             {
21400256                 buffer += <span class="stringliteral">"\t"</span>;
21500257             }
21600258             buffer += <span class="stringliteral">"// "</span> + comment;
21700259         }
21800260
21900261     };
22000262 }
22100263 <span class="preprocessor">#endif</span>
222</pre></div><hr>
223<p>
224Copyright &copy; 2000-2005 by The OGRE Team<br />
225<!--Creative Commons License--><a rel="license" href="http://creativecommons.org/licenses/by-sa/2.5/"><img alt="Creative Commons License" border="0" src="http://creativecommons.org/images/public/somerights20.png"/></a><br/>
226This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/2.5/">Creative Commons Attribution-ShareAlike 2.5 License</a>.<br/>
227                <!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
228                <Work rdf:about="">
229                        <license rdf:resource="http://creativecommons.org/licenses/by-sa/2.5/" />
230        <dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
231                </Work>
232                <License rdf:about="http://creativecommons.org/licenses/by-sa/2.5/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
233
234Last modified Sun Mar 12 14:37:43 2006
235</p>
236</body>
237</html>
Note: See TracBrowser for help on using the repository browser.