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); }
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); }
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; }
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(); }
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; } }
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; }
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(); }