MCPcopy Create free account
hub / github.com/dhewm/dhewm3 / ParseMaterialText

Method ParseMaterialText

neo/tools/materialeditor/MaterialDoc.cpp:648–666  ·  view source on GitHub ↗

* Passes text to a render material for parsing. * @param source The text that sould be applied to the idMaterial. */

Source from the content-addressed store, hash-verified

646* @param source The text that sould be applied to the idMaterial.
647*/
648void MaterialDoc::ParseMaterialText(const char* source) {
649
650 /*idLexer src;
651 src.LoadMemory(source, strlen(source), "material");
652 src.SetFlags(
653 LEXFL_NOSTRINGCONCAT | // multiple strings seperated by whitespaces are not concatenated
654 LEXFL_NOSTRINGESCAPECHARS | // no escape characters inside strings
655 LEXFL_ALLOWPATHNAMES | // allow path seperators in names
656 LEXFL_ALLOWMULTICHARLITERALS | // allow multi character literals
657 LEXFL_ALLOWBACKSLASHSTRINGCONCAT | // allow multiple strings seperated by '\' to be concatenated
658 LEXFL_NOFATALERRORS // just set a flag instead of fatal erroring
659 );
660
661 //Skip the name becuase the material parsing code expects it
662 src.SkipUntilString("{");*/
663
664 //Now let the material parse the text
665 renderMaterial->Parse(source, strlen(source));
666}
667
668/**
669* Parses the source text from an idMaterial and initializes the editor dictionary representation

Callers

nothing calls this directly

Calls 1

ParseMethod · 0.45

Tested by

no test coverage detected