public virtual void SetIndices(params ushort[] indices) { indexCount = indices.Length; vao.Bind(); indexBuffer.SetData(indices, Usage.DynamicDraw); IndexType = DataType.UnsignedShort; }
public virtual void SetIndices(ushort[] indices, int offset, int count) { using var _ = Profiler.Scope("Set Indices"); indexCount = indices.Length; vao.Bind(); indexBuffer.SetData(indices, offset, count, Usage.DynamicDraw); IndexType = DataType.UnsignedShort; }
void SetData() { ForceData[] OutputData = new ForceData[Sources.Count]; if (ForceBuffer.Count != OutputData.Length) { UpdateCount(); } for (int i = OutputData.Length - 1; i >= 0; i--) { if (Sources[i] == null) { RemoveSource(i); } OutputData[i] = Sources[i].gameObject.activeSelf ? Sources[i].GetForceData() : PsyiaForce.EmptyForceData; } ForceBuffer.SetData(OutputData); }
public virtual unsafe void SetVertices(float[] vertices, List <VertexFormatDescriptor> desc) { vertexBuffer.SetData(vertices, Usage.DynamicDraw); SetupVertexAttribs(desc); }