OGRE-Next
4.0.0unstable
Object-Oriented Graphics Rendering Engine
|
HLMS stands for "High Level Material System". More...
#include <OgreHlmsJson.h>
Classes | |
struct | NamedBlocks |
Public Member Functions | |
HlmsJson (HlmsManager *hlmsManager, HlmsJsonListener *listener) | |
~HlmsJson () | |
String | getName (const HlmsBlendblock *blendblock) const |
String | getName (const HlmsMacroblock *macroblock) const |
void | loadMaterials (const String &filename, const String &resourceGroup, const char *jsonString, const String &additionalTextureExtension) |
Loads all Hlms datablocks from a JSON formatted string. More... | |
void | saveMaterial (const HlmsDatablock *datablock, String &outString, const String &additionalTextureExtension) |
Saves a single datablock to a string. More... | |
void | saveMaterials (const Hlms *hlms, String &outString, const String &additionalTextureExtension, bool sortByName=false) |
Saves all the Datablocks defined in the given Hlms into a JSON formatted string. More... | |
Static Public Member Functions | |
static String | getName (const HlmsSamplerblock *samplerblock) |
static SceneBlendFactor | parseBlendFactor (const char *value) |
static SceneBlendOperation | parseBlendOperation (const char *value) |
static CompareFunction | parseCompareFunction (const char *value) |
static CullingMode | parseCullMode (const char *value) |
static FilterOptions | parseFilterOptions (const char *value) |
static PolygonMode | parsePolygonMode (const char *value) |
static TextureAddressingMode | parseTextureAddressingMode (const char *value) |
static void | toQuotedStr (CompareFunction value, String &outString) |
static void | toQuotedStr (CullingMode value, String &outString) |
static void | toQuotedStr (FilterOptions value, String &outString) |
static void | toQuotedStr (PolygonMode value, String &outString) |
static void | toQuotedStr (SceneBlendFactor value, String &outString) |
static void | toQuotedStr (SceneBlendOperation value, String &outString) |
static void | toQuotedStr (TextureAddressingMode value, String &outString) |
static void | toStr (const ColourValue &value, String &outString) |
static void | toStr (const Vector2 &value, String &outString) |
static void | toStr (const Vector3 &value, String &outString) |
static void | toStr (const Vector4 &value, String &outString) |
HLMS stands for "High Level Material System".
Ogre::HlmsJson::HlmsJson | ( | HlmsManager * | hlmsManager, |
HlmsJsonListener * | listener | ||
) |
Ogre::HlmsJson::~HlmsJson | ( | ) |
String Ogre::HlmsJson::getName | ( | const HlmsBlendblock * | blendblock | ) | const |
String Ogre::HlmsJson::getName | ( | const HlmsMacroblock * | macroblock | ) | const |
|
static |
void Ogre::HlmsJson::loadMaterials | ( | const String & | filename, |
const String & | resourceGroup, | ||
const char * | jsonString, | ||
const String & | additionalTextureExtension | ||
) |
Loads all Hlms datablocks from a JSON formatted string.
filename | Name of the file. It's only used for providing additional info on the log about where it is failing. |
resourceGroup | See filename argument. |
jsonString | Null-terminated C string (UTF8) containing valid JSON with the Hlms definitions. |
additionalTextureExtension | Additional string to append to the texture files while loading. e.g. if texture to load is "mytex.png" and additionalTextureExtension = ".dds" then the actual texture loaded will be "mytex.png.dds" Leave it blank if you don't know what to put |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
void Ogre::HlmsJson::saveMaterial | ( | const HlmsDatablock * | datablock, |
String & | outString, | ||
const String & | additionalTextureExtension | ||
) |
Saves a single datablock to a string.
datablock | Material to save. |
outString | [out] String with valid JSON output. String is appended to existing contents. |
additionalTextureExtension | Additional string to append to the texture files while saving. e.g. if texture name is "mytex.png" and additionalTextureExtension = ".dds" then the actual texture saved will be "mytex.png.dds" Leave it blank if you don't know what to put |
void Ogre::HlmsJson::saveMaterials | ( | const Hlms * | hlms, |
String & | outString, | ||
const String & | additionalTextureExtension, | ||
bool | sortByName = false |
||
) |
Saves all the Datablocks defined in the given Hlms into a JSON formatted string.
hlms | Hlms from whose materials to save. |
outString | [out] String with valid JSON output. String is appended to existing contents. |
additionalTextureExtension | Additional string to append to the texture files while saving. e.g. if texture name is "mytex.png" and additionalTextureExtension = ".dds" then the actual texture saved will be "mytex.png.dds" Leave it blank if you don't know what to put |
sortByName | Use true if output JSON should have materials sorted alphabetically by name (case sensitive). |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |