/// <summary> /// 一个vertex array object。(即VAO) /// <para>VAO是用来管理VBO的。可以进一步减少DrawCall。</para> /// </summary> /// <param name="propertyBuffers">给出此VAO要管理的所有VBO。</param> public VertexArrayObject(params BufferRenderer[] propertyBuffers) { this.bufferRenderers = propertyBuffers; foreach (var item in propertyBuffers) { var renderer = item as IndexBufferBaseRenderer; if (renderer != null) { if (this.indexBufferRenderer != null) { throw new Exception("More than 1 index buffer renderer!"); } else { indexBufferRenderer = renderer; } } } }