Ejemplo n.º 1
0
        public virtual void SetIndices(params ushort[] indices)
        {
            indexCount = indices.Length;

            vao.Bind();
            indexBuffer.SetData(indices, Usage.DynamicDraw);
            IndexType = DataType.UnsignedShort;
        }
Ejemplo n.º 2
0
        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;
        }
Ejemplo n.º 3
0
        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);
        }
Ejemplo n.º 4
0
 public virtual unsafe void SetVertices(float[] vertices, List <VertexFormatDescriptor> desc)
 {
     vertexBuffer.SetData(vertices, Usage.DynamicDraw);
     SetupVertexAttribs(desc);
 }