public GfxBuffer SetSequence(uint Len, VertexUsageHint Hint = VertexUsageHint.StaticDraw) { uint[] Arr = new uint[Len]; for (uint i = 0; i < Len; i++) { Arr[i] = i; } return(SetData(Arr, Hint)); }
public static GfxBuffer CreateFromData <T>(IEnumerable <T> Data, VertexUsageHint Hint = VertexUsageHint.StaticDraw) where T : struct { return(CreateFromData(Data.ToArray(), Hint)); }
public virtual GfxBuffer SetData <T>(int Size, T[] Data, VertexUsageHint Hint = VertexUsageHint.StaticDraw) where T : struct { Length = Data.Length; GL.NamedBufferData(ID, Size, Data, (BufferUsageHint)Hint); return(this); }
public static GfxBuffer CreateFromData <T>(T[] Data, VertexUsageHint Hint = VertexUsageHint.StaticDraw) where T : struct { return(new DataBuffer(typeof(T)).SetData(Data, Hint)); }
public virtual GfxBuffer SetData <T>(T[] Data, VertexUsageHint Hint = VertexUsageHint.StaticDraw) where T : struct { return(SetData(Data.Length * Marshal.SizeOf <T>(), Data, Hint)); }