| 598 | } |
| 599 | |
| 600 | void MatInstance::getShaderInfo(GuiTreeViewCtrl* tree, U32 item) const |
| 601 | { |
| 602 | if (mMaterial == NULL) |
| 603 | { |
| 604 | Con::errorf("Trying to get Material information on an invalid MatInstance"); |
| 605 | return; |
| 606 | } |
| 607 | |
| 608 | if (mProcessedMaterial == NULL) |
| 609 | { |
| 610 | Con::printf(" [no processed material!]"); |
| 611 | return; |
| 612 | } |
| 613 | |
| 614 | const FeatureSet features = mProcessedMaterial->getFeatures(); |
| 615 | |
| 616 | String featureDesc = ""; |
| 617 | for (U32 i = 0; i < features.getCount(); i++) |
| 618 | { |
| 619 | const FeatureType& ft = features.getAt(i); |
| 620 | |
| 621 | featureDesc += ft.getName(); |
| 622 | |
| 623 | if(i+1 < features.getCount()) |
| 624 | featureDesc += ", "; |
| 625 | } |
| 626 | |
| 627 | U32 newItem = tree->insertItem(item, featureDesc); |
| 628 | |
| 629 | mProcessedMaterial->getMaterialInfo(tree, newItem); |
| 630 | } |
no test coverage detected