MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / getShaderInfo

Method getShaderInfo

Engine/source/materials/matInstance.cpp:600–630  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

598}
599
600void 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}

Callers 1

getMaterialInstancesMethod · 0.80

Calls 7

printfFunction · 0.85
errorfFunction · 0.50
getFeaturesMethod · 0.45
getCountMethod · 0.45
getNameMethod · 0.45
insertItemMethod · 0.45
getMaterialInfoMethod · 0.45

Tested by

no test coverage detected