public void DrawBuffers()
{
if (VertexBufferID != 0)
{
GL.BindBuffer(BufferTarget.ArrayBuffer, VertexBufferID);
GL.VertexPointer(3, VertexPointerType.Float, Vector3.SizeInBytes, IntPtr.Zero);
GL.EnableClientState(ArrayCap.VertexArray);
}
if (ColorBufferID != 0)
{
GL.BindBuffer(BufferTarget.ArrayBuffer, ColorBufferID);
GL.ColorPointer(4, ColorPointerType.UnsignedByte, sizeof(int), IntPtr.Zero);
GL.EnableClientState(ArrayCap.ColorArray);
}
if (IndicesBufferID != 0)
{
GL.BindBuffer(BufferTarget.ElementArrayBuffer, IndicesBufferID);
GL.DrawElements(BeginMode.Triangles, IndicesData.Length,
DrawElementsType.UnsignedInt, IntPtr.Zero);
}
}