Пример #1
0
 void FillTextures()
 {
     while (true)
     {
         threadShouldBeWorking.WaitOne();
         if (currentLink == null)
         {
             threadFinished = true;
             return;
         }
         currentLink.Process(ref buffers);
         threadFinished = true;
     }
 }
Пример #2
0
 void FillTexturesImmediately()
 {
     for (int i = 0; i < links.Length; i++)
     {
         DiagramMaterialLink link = links[i];
         link.AllocateTextures();
         if (link.diagram.isCubemap)
         {
             for (CubemapFace d = CubemapFace.PositiveX; d <= CubemapFace.NegativeZ; d++)
             {
                 link.currentDirection = d;
                 link.Process(ref buffers);
                 link.AssignCubemapFaces(buffers);
             }
         }
         else
         {
             link.Process(ref buffers);
         }
         link.ApplyTextures(buffers);
         link.AssignTexturesToMaterials();
     }
     FinishGenerating();
 }