void csTextureList::AddBatch (csRef<iTextureLoaderIterator> itr, bool precache) { CS::Threading::ScopedWriteLock lock(texLock); while(itr->HasNext()) { iTextureWrapper* tex = itr->Next(); Push(tex); if(precache && tex->GetTextureHandle()) { tex->GetTextureHandle()->Precache(); } } }
void csMeshList::AddBatch (csRef<iMeshLoaderIterator> itr) { CS::Threading::ScopedWriteLock lock(meshLock); while(itr->HasNext()) { iMeshWrapper* obj = itr->Next(); PrepareMesh (obj); const char* name = obj->QueryObject ()->GetName (); if (name) meshes_hash.Put (name, obj); obj->QueryObject ()->AddNameChangeListener (listener); list.Push (obj); } }
void csTinyXmlNode::RemoveNodes (csRef<iDocumentNodeIterator> children) { if ((node->Type() != TiDocumentNode::ELEMENT) && (node->Type() != TiDocumentNode::DOCUMENT)) return; TiDocumentNodeChildren* node_children = GetTiNodeChildren (); while (children->HasNext ()) { csRef<iDocumentNode> n = children->Next (); csTinyXmlNode* tiNode = static_cast<csTinyXmlNode*>((iDocumentNode*)n); node_children->RemoveChild (tiNode->GetTiNode ()); } lastChild = 0; }