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

Method createWithProgramState

core/3d/MeshMaterial.cpp:308–321  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

306}
307
308MeshMaterial* MeshMaterial::createWithProgramState(backend::ProgramState* programState)
309{
310 AXASSERT(programState, "Invalid program state.");
311
312 auto mat = new MeshMaterial();
313 if (mat->initWithProgramState(programState))
314 {
315 mat->_type = MeshMaterial::MaterialType::CUSTOM;
316 mat->autorelease();
317 return mat;
318 }
319 AX_SAFE_DELETE(mat);
320 return nullptr;
321}
322
323void MeshMaterial::setTexture(Texture2D* tex, NTextureData::Usage usage)
324{

Callers

nothing calls this directly

Calls 2

autoreleaseMethod · 0.80
initWithProgramStateMethod · 0.45

Tested by

no test coverage detected