Пример #1
0
 //  This method tells us if this buffer is almost consumed, so few more allocations and it's done.
 //  In that case, level needs to be reinicialized by server.
 public static bool IsAlmostFull()
 {
     //return m_nextForAllocation >= (m_capacity * 0.9);
     return(m_preallocatedContents.GetActiveCount() > (m_preallocatedContents.GetCapacity() * 0.9));
 }
Пример #2
0
 //  Checks if buffer has enough free triangles for adding new decal. If not, we can't add triangles
 //  of the decal (because we add all decal triangles or none)
 public bool CanAddTriangles(int newTrianglesCount)
 {
     //  If buffer is full, we can't add new triangles
     return((m_triangles.GetActiveCount() + newTrianglesCount) < m_triangles.GetCapacity());
 }