예제 #1
0
파일: texture.cpp 프로젝트: garinh/cs
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();
    }
  }
}
예제 #2
0
파일: meshobj.cpp 프로젝트: garinh/cs
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);
  }
}
예제 #3
0
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;
}