示例#1
0
 public GLBatch(int maxVertices)
 {
     this.m_maxVertices   = maxVertices;
     this.glbase          = new GLBase(maxVertices);
     this.vertexsBuffer   = new List <Vector3>(3 * maxVertices);
     this.colorsBuffer    = new List <Color>(4 * maxVertices);
     this.texCoordsBuffer = new List <Vector2>(2 * maxVertices);
 }
示例#2
0
 public GLBatch(int maxVertices)
 {
     this.m_maxVertices = maxVertices;
     this.glbase = new GLBase(maxVertices);
     this.vertexsBuffer = new List<Vector3>(3 * maxVertices);
     this.colorsBuffer = new List<Color>(4 * maxVertices);
     this.texCoordsBuffer = new List<Vector2>(2 * maxVertices);
 }
示例#3
0
 private void Make(int size)
 {
     device = GL.device;
     if (vectors == null)
     {
         ver     = size;
         vectors = new List <Vector3>(ver);
     }
     if (colors == null)
     {
         col    = size / 4;
         colors = new List <Color>(col);
     }
     if (coords == null)
     {
         tex    = size / 2;
         coords = new List <Vector2>(tex);
     }
     this.glbase   = new GLBase(size);
     this.maxCount = size;
 }
示例#4
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();
 }
示例#5
0
 public void Dispose()
 {
     this.batchCount = 0;
     this.useBegin   = false;
     this.isLocked   = true;
     this.vectors    = null;
     this.colors     = null;
     this.coords     = null;
     if (glbase != null)
     {
         this.glbase.Dispose();
         this.glbase = null;
     }
     if (m_lastCache != null)
     {
         m_lastCache.Dispose();
         m_lastCache = null;
     }
     if (image_colors != null)
     {
         image_colors = null;
     }
 }
示例#6
0
 private void Make(int size)
 {
     device = GL.device;
     if (vectors == null)
     {
         ver = size;
         vectors = new List<Vector3>(ver);
     }
     if (colors == null)
     {
         col = size / 4;
         colors = new List<Color>(col);
     }
     if (coords == null)
     {
         tex = size / 2;
         coords = new List<Vector2>(tex);
     }
     this.glbase = new GLBase(size);
     this.maxCount = size;
 }
示例#7
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();
 }
示例#8
0
 public void Dispose()
 {
     this.batchCount = 0;
     this.useBegin = false;
     this.isLocked = true;
     this.vectors = null;
     this.colors = null;
     this.coords = null;
     if (glbase != null)
     {
         this.glbase.Dispose();
         this.glbase = null;
     }
     if (m_lastCache != null)
     {
         m_lastCache.Dispose();
         m_lastCache = null;
     }
     if (image_colors != null)
     {
         image_colors = null;
     }
 }