MCPcopy Create free account
hub / github.com/axmolengine/axmol / initWithFile

Method initWithFile

core/renderer/Material.cpp:130–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

128}
129
130bool Material::initWithFile(std::string_view validfilename)
131{
132 // Warning: properties is not a "Object" object, must be manually deleted
133 Properties* properties = Properties::createNonRefCounted(validfilename);
134
135 // get the first material
136 parseProperties((strlen(properties->getNamespace()) > 0) ? properties : properties->getNextNamespace());
137
138 AX_SAFE_DELETE(properties);
139 return true;
140}
141
142bool Material::initWithProperties(Properties* materialProperties)
143{

Callers 1

createWithFilenameMethod · 0.45

Calls 2

getNamespaceMethod · 0.80
getNextNamespaceMethod · 0.80

Tested by

no test coverage detected