/// <summary> /// Buffers the entire local array to designated storage /// </summary> /// <remarks>Where the data is stored is implementation specific, and the usage variable is considered a hint, not a command.</remarks> /// <param name="usage">Data usage.</param> /// <seealso cref="Glorg2.Graphics.OpenGL.OpenGL.VboUsage"/> public void BufferData(VboUsage usage) { OpenGL.glBindBuffer(target, handle); var h = System.Runtime.InteropServices.GCHandle.Alloc(internal_array, System.Runtime.InteropServices.GCHandleType.Pinned); OpenGL.glBufferData(target, new IntPtr(size_of_t * internal_array.Length), h.AddrOfPinnedObject(), (uint)usage); h.Free(); }