| 306 | } |
| 307 | |
| 308 | MeshMaterial* 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 | |
| 323 | void MeshMaterial::setTexture(Texture2D* tex, NTextureData::Usage usage) |
| 324 | { |
nothing calls this directly
no test coverage detected