Beispiel #1
0
 void DestroyVBO(ChunkVBO tV)
 {
     if (tV != null)
     {
         lock (OwningRegion.TheClient.vbos)
         {
             if (tV.generated && OwningRegion.TheClient.vbos.Count < MAX_VBOS_REMEMBERED)
             {
                 OwningRegion.TheClient.vbos.Enqueue(tV);
             }
             else
             {
                 tV.Destroy();
             }
         }
     }
 }
Beispiel #2
0
        ChunkVBO GetVBO(Texture text)
        {
            if (text == null)
            {
                return(null);
            }
            for (int i = 0; i < VBOs.Count; i++)
            {
                if (VBOs[i].VBOTexture.Internal_Texture == text.Internal_Texture)
                {
                    return(VBOs[i]);
                }
            }
            ChunkVBO cvbo = new ChunkVBO();

            cvbo.VBOTexture = text;
            VBOs.Add(cvbo);
            return(cvbo);
        }