コード例 #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
ファイル: GLBatch.cs プロジェクト: darragh-murphy/LGame
 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
ファイル: LTextureBatch.cs プロジェクト: keppelcao/LGame
 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
ファイル: LTextureBatch.cs プロジェクト: keppelcao/LGame
 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
ファイル: LTextureBatch.cs プロジェクト: keppelcao/LGame
 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;
     }
 }