예제 #1
0
        private void CheckFlush(int newVertices)
        {
            if (_renderer.GetMaxVertices() - _renderer.GetNumVertices() >= newVertices)
            {
                return;
            }
            GLType type = _currType;

            End();
            Begin(type);
        }
예제 #2
0
 private void Make(GLBatch batch)
 {
     device = GL.device;
     if (vectors == null)
     {
         ver     = batch.GetMaxVertices();
         vectors = new List <Vector3>(ver);
     }
     if (colors == null)
     {
         col    = batch.GetMaxVertices() / 4;
         colors = new List <Color>(col);
     }
     if (coords == null)
     {
         tex    = batch.GetMaxVertices() / 2;
         coords = new List <Vector2>(tex);
     }
     this.glbase   = batch.Base;
     this.maxCount = batch.GetMaxVertices();
 }
예제 #3
0
 private void Make(GLBatch batch)
 {
     device = GL.device;
     if (vectors == null)
     {
         ver = batch.GetMaxVertices();
         vectors = new List<Vector3>(ver);
     }
     if (colors == null)
     {
         col = batch.GetMaxVertices() / 4;
         colors = new List<Color>(col);
     }
     if (coords == null)
     {
         tex = batch.GetMaxVertices() / 2;
         coords = new List<Vector2>(tex);
     }
     this.glbase = batch.Base;
     this.maxCount = batch.GetMaxVertices();
 }