![]() |
OGRE 14.4
Object-Oriented Graphics Rendering Engine
|
Class for serializing Materials to a .material script. More...
#include <OgreMaterialSerializer.h>
Inheritance diagram for Ogre::MaterialSerializer:Classes | |
| class | Listener |
| Class that allows listening in on the various stages of material serialization process. More... | |
Public Types | |
| enum | SerializeEvent { MSE_PRE_WRITE , MSE_WRITE_BEGIN , MSE_WRITE_END , MSE_POST_WRITE } |
Class for serializing Materials to a .material script.
| Ogre::MaterialSerializer::MaterialSerializer | ( | ) |
default constructor
|
inlinevirtual |
default destructor
| void Ogre::MaterialSerializer::queueForExport | ( | const MaterialPtr & | pMat, |
| bool | clearQueued = false, |
||
| bool | exportDefaults = false, |
||
| const String & | materialName = "" |
||
| ) |
Queue an in-memory Material to the internal buffer for export.
| pMat | Material pointer |
| clearQueued | If true, any materials already queued will be removed |
| exportDefaults | If true, attributes which are defaulted will be included in the script exported, otherwise they will be omitted |
| materialName | Allow exporting the given material under a different name. In case of empty string the original material name will be used. |
| void Ogre::MaterialSerializer::exportQueued | ( | const String & | filename, |
| const bool | includeProgDef = false, |
||
| const String & | programFilename = "" |
||
| ) |
Exports queued material(s) to a named material script file.
| filename | the file name of the material script to be exported |
| includeProgDef | If true, vertex program and fragment program definitions will be written at the top of the material script |
| programFilename | the file name of the vertex / fragment program script to be exported. This is only used if there are program definitions to be exported and includeProgDef is false when calling queueForExport. |
| void Ogre::MaterialSerializer::exportMaterial | ( | const MaterialPtr & | pMat, |
| const String & | filename, | ||
| bool | exportDefaults = false, |
||
| const bool | includeProgDef = false, |
||
| const String & | programFilename = "", |
||
| const String & | materialName = "" |
||
| ) |
Exports a single in-memory Material to the named material script file.
| pMat | Material pointer |
| filename | the file name of the material script to be exported |
| exportDefaults | if true then exports all values including defaults |
| includeProgDef | if true includes Gpu shader program definitions in the export material script otherwise if false then program definitions will be exported to a separate file with name programFilename if programFilename is not empty |
| programFilename | the file name of the vertex / fragment program script to be exported. This is only used if includeProgDef is false. |
| materialName | Allow exporting the given material under a different name. In case of empty string the original material name will be used. |
Returns a string representing the parsed material(s)
| void Ogre::MaterialSerializer::clearQueue | ( | ) |
Clears the internal buffer.
Register a listener to this Serializer.
Remove a listener from this Serializer.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |