Save on a number of CPU costly strcmp calls when using the blend function
This commit is contained in:
@@ -102,9 +102,9 @@ change_alpha( ssgBase *_branch, float _blend )
|
|||||||
for (i = 0; i < ((ssgBranch *)_branch)->getNumKids(); i++)
|
for (i = 0; i < ((ssgBranch *)_branch)->getNumKids(); i++)
|
||||||
change_alpha( ((ssgBranch *)_branch)->getKid(i), _blend );
|
change_alpha( ((ssgBranch *)_branch)->getKid(i), _blend );
|
||||||
|
|
||||||
if ( strcmp("ssgLeaf", _branch->getTypeName()) &&
|
if ( !_branch->isAKindOf(ssgTypeLeaf())
|
||||||
strcmp("ssgVtxTable", _branch->getTypeName()) &&
|
&& !_branch->isAKindOf(ssgTypeVtxTable())
|
||||||
strcmp("ssgVTable", _branch->getTypeName()) )
|
&& !_branch->isAKindOf(ssgTypeVTable()) )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
int num_colors = ((ssgLeaf *)_branch)->getNumColours();
|
int num_colors = ((ssgLeaf *)_branch)->getNumColours();
|
||||||
|
|||||||
Reference in New Issue
Block a user