OGRE-Next  2.3
Object-Oriented Graphics Rendering Engine
Ogre::HlmsJson Class Reference

HLMS stands for "High Level Material System". More...

#include <OgreHlmsJson.h>

+ Inheritance diagram for Ogre::HlmsJson:

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 operator delete (void *ptr)
 
void operator delete (void *ptr, const char *, int, const char *)
 
void operator delete (void *ptr, void *)
 
void operator delete[] (void *ptr)
 
void operator delete[] (void *ptr, const char *, int, const char *)
 
void * operator new (size_t sz)
 
void * operator new (size_t sz, const char *file, int line, const char *func)
 operator new, with debug line info More...
 
void * operator new (size_t sz, void *ptr)
 placement operator new More...
 
void * operator new[] (size_t sz)
 
void * operator new[] (size_t sz, const char *file, int line, const char *func)
 array operator new, with debug line info 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)
 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)
 

Detailed Description

HLMS stands for "High Level Material System".

Constructor & Destructor Documentation

◆ HlmsJson()

Ogre::HlmsJson::HlmsJson ( HlmsManager hlmsManager,
HlmsJsonListener listener 
)

◆ ~HlmsJson()

Ogre::HlmsJson::~HlmsJson ( )

Member Function Documentation

◆ getName() [1/3]

String Ogre::HlmsJson::getName ( const HlmsBlendblock blendblock) const

◆ getName() [2/3]

String Ogre::HlmsJson::getName ( const HlmsMacroblock macroblock) const

◆ getName() [3/3]

static String Ogre::HlmsJson::getName ( const HlmsSamplerblock samplerblock)
static

◆ loadMaterials()

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.

Remarks
Will throw ERR_INVALIDPARAMS if JSON is invalid.
Parameters
filenameName of the file. It's only used for providing additional info on the log about where it is failing.
resourceGroupSee filename argument.
jsonStringNull-terminated C string (UTF8) containing valid JSON with the Hlms definitions.
additionalTextureExtensionAdditional 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

◆ operator delete() [1/3]

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void *  ptr)
inlineinherited

◆ operator delete() [2/3]

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void *  ptr,
const char *  ,
int  ,
const char *   
)
inlineinherited

◆ operator delete() [3/3]

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void *  ptr,
void *   
)
inlineinherited

◆ operator delete[]() [1/2]

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete[] ( void *  ptr)
inlineinherited

◆ operator delete[]() [2/2]

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete[] ( void *  ptr,
const char *  ,
int  ,
const char *   
)
inlineinherited

◆ operator new() [1/3]

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new ( size_t  sz)
inlineinherited

◆ operator new() [2/3]

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new ( size_t  sz,
const char *  file,
int  line,
const char *  func 
)
inlineinherited

operator new, with debug line info

◆ operator new() [3/3]

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new ( size_t  sz,
void *  ptr 
)
inlineinherited

placement operator new

◆ operator new[]() [1/2]

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new[] ( size_t  sz)
inlineinherited

◆ operator new[]() [2/2]

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new[] ( size_t  sz,
const char *  file,
int  line,
const char *  func 
)
inlineinherited

array operator new, with debug line info

◆ parseBlendFactor()

static SceneBlendFactor Ogre::HlmsJson::parseBlendFactor ( const char *  value)
static

◆ parseBlendOperation()

static SceneBlendOperation Ogre::HlmsJson::parseBlendOperation ( const char *  value)
static

◆ parseCompareFunction()

static CompareFunction Ogre::HlmsJson::parseCompareFunction ( const char *  value)
static

◆ parseCullMode()

static CullingMode Ogre::HlmsJson::parseCullMode ( const char *  value)
static

◆ parseFilterOptions()

static FilterOptions Ogre::HlmsJson::parseFilterOptions ( const char *  value)
static

◆ parsePolygonMode()

static PolygonMode Ogre::HlmsJson::parsePolygonMode ( const char *  value)
static

◆ parseTextureAddressingMode()

static TextureAddressingMode Ogre::HlmsJson::parseTextureAddressingMode ( const char *  value)
static

◆ saveMaterial()

void Ogre::HlmsJson::saveMaterial ( const HlmsDatablock datablock,
String outString,
const String additionalTextureExtension 
)

Saves a single datablock to a string.

Parameters
datablockMaterial to save.
outString[out] String with valid JSON output. String is appended to existing contents.
additionalTextureExtensionAdditional 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

◆ saveMaterials()

void Ogre::HlmsJson::saveMaterials ( const Hlms hlms,
String outString,
const String additionalTextureExtension 
)

Saves all the Datablocks defined in the given Hlms into a JSON formatted string.

Parameters
hlmsHlms from whose materials to save.
outString[out] String with valid JSON output. String is appended to existing contents.
additionalTextureExtensionAdditional 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

◆ toQuotedStr() [1/7]

static void Ogre::HlmsJson::toQuotedStr ( CompareFunction  value,
String outString 
)
static

◆ toQuotedStr() [2/7]

static void Ogre::HlmsJson::toQuotedStr ( CullingMode  value,
String outString 
)
static

◆ toQuotedStr() [3/7]

static void Ogre::HlmsJson::toQuotedStr ( FilterOptions  value,
String outString 
)
static

◆ toQuotedStr() [4/7]

static void Ogre::HlmsJson::toQuotedStr ( PolygonMode  value,
String outString 
)
static

◆ toQuotedStr() [5/7]

static void Ogre::HlmsJson::toQuotedStr ( SceneBlendFactor  value,
String outString 
)
static

◆ toQuotedStr() [6/7]

static void Ogre::HlmsJson::toQuotedStr ( SceneBlendOperation  value,
String outString 
)
static

◆ toQuotedStr() [7/7]

static void Ogre::HlmsJson::toQuotedStr ( TextureAddressingMode  value,
String outString 
)
static

◆ toStr() [1/4]

static void Ogre::HlmsJson::toStr ( const ColourValue value,
String outString 
)
static

◆ toStr() [2/4]

static void Ogre::HlmsJson::toStr ( const Vector2 value,
String outString 
)
static

◆ toStr() [3/4]

static void Ogre::HlmsJson::toStr ( const Vector3 value,
String outString 
)
static

◆ toStr() [4/4]

static void Ogre::HlmsJson::toStr ( const Vector4 value,
String outString 
)
static

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