Milk/Gfx/BufferObject.cs
/// <summary>
/// Add vertices to the BufferObject causing the BufferObject to update the GPU, updating the buffers size if need be.
/// </summary>
/// <param name="vertices"></param>
Add vertices to the BufferObject causing the BufferObject to update the GPU, updating the buffers size if need be.
Add vertices to the BufferObject causing the BufferObject to update the GPU updating the buffers size if need be .
public void AddVertices(params TVertex[] vertices)
        {
            int currentSize = _vertices.Length;
            int numVertices = vertices.Length;
            int newSize = Count + numVertices;
            if (newSize > currentSize)
            {
                int doubled = currentSize * 2;
                Array.Resize(ref _vertices, newSize > doubled ? newSize : doubled);
            }
            for (int i = 0; i < vertices.Length; i++)
                _vertices[Count++] = vertices[i];
            _isDirty = true;
        }
public void AddVertices ( params TVertex [ ] vertices ) { int currentSize = _vertices . Length ; int numVertices = vertices . Length ; int newSize = Count + numVertices ; if ( newSize > currentSize ) { int doubled = currentSize * 2 ; Array . Resize ( ref _vertices , newSize > doubled ? newSize : doubled ) ; } for ( int i = 0 ; i < vertices . Length ; i ++ ) _vertices [ Count ++ ] = vertices [ i ] ; _isDirty = true ; }
Add vertices to the BufferObject causing the BufferObject to update the GPU, updating the buffers size if need be.
Add vertices to the BufferObject causing the BufferObject to update the GPU updating the buffers size if need be .
vertices
None