Пример #1
0
 public static void MapBufferToArray(int bufferId, int index, int elementSize)
 {
     BindBuffer(bufferId);
     buffersData[bufferId] = new DirectXBufferData()
     {
         index = index, elementSize = elementSize, array = currentArray
     };
     RemapVertexBufferBinding(bufferId);
 }
Пример #2
0
        private static void RemapVertexBufferBinding(int bufferId)
        {
            DirectXBufferData data = buffersData[bufferId];

            currentArray.SetBuffer(data.index, new VertexBufferBinding(buffers[bufferId], data.elementSize * sizeof(float), 0));
        }